Data type int, double, float are not nullable

Tag(s):

When you use primitive data types(i.e int, double and float) with hibernate, you will not be able to convert them to null because Java doesn't allow them to be null. In order for these data types to be null, use their object counter part.(i.e Integer, Double, Float). However, it is very expensive to use the object data type. Therefore, use them only when needed.