
Originally Posted by
julien.dubois
A Boolean is either true or false, that's the very definition of a boolean.
A java.lang.Boolean object is just a wrapper around the boolean primitive type : if you don't instantiate this object, it will be considered as "false", hence it will be saved as "0" (which means "false").
This is a perfectly normal behavior, and hasn't got anything to do with Spring.
Boolean objects can be null. If you try to access them as a primitive value, they will throw a NullPointerException.
eg:
Code:
Boolean b = null;
if (b);
So in theory, Boolean have 3 states (null, false, true) while boolean only have 2.