From my point of view, Hsql backend will sometimes return 0 for NULL. Not sure if it is expected or not.