I had a problem with hbm2java (in 2.1.2 tools) whereby for properties with hibernate PrimitiveTypes (in my case "yes_no" - but also int etc.) hbm2java
always generated a primitive java type - e.g. boolean - even if the property was nullable.
I solved this by changing line 225 of
net/sf/hibernate/tool/hbm2java/ClassMapping.java
from
Code:
ClassName t = getFieldType(type);
to
Code:
ClassName t = getFieldType(type,nullable,false);
and re-compiling the hibernate-tools.jar.
Works ok for me now, I get java.lang.Boolean java properties created when nullable.
Luke