Hi,
I'm trying to override the default boolean primitive type that is used when reverse engineering a column that is of type "BOOLEAN NOT NULL". Even though the column can not be null, I want to use java.lang.Boolean for this field so that I can set the entity property to null temporarily or on objects that will never be persisted.
Using the hibernate.reveng.xml file does not seem to work, I have the following:
Code:
<type-mapping>
<sql-type jdbc-type="CHAR" hibernate-type="java.lang.String"/>
<sql-type jdbc-type="INTEGER" hibernate-type="java.lang.Integer"/>
<sql-type jdbc-type="BOOLEAN" not-null="false" hibernate-type="java.lang.Boolean"/>
<sql-type jdbc-type="BOOLEAN" not-null="true" hibernate-type="java.lang.Boolean"/>
<sql-type jdbc-type="NUMERIC" precision='1' hibernate-type="java.lang.Boolean"/>
</type-mapping>
But I still get a type of boolean for those columns. Why doesn't this reverse engineering specification work? Is there any other way to do this?
Thanks!