Hibernate version:
3.1.2
Mapping documents:
Annotations API 3.0.5ß
Hi all,
I wrote a user type "JaNeinType" analog to the "YesNoType", which comes out of the box with Hibernate. I'd like to work with Booleans inside my Java objects and the mapping to "J" resp. "N" should be done when saving. This shouldn't be a problem as it works for "yes_no" and "true_false" too.
When I try to put "ja_nein" in my hibernate.reveng.xml it will be written 1:1 as ja_nein in my generated classes. If I use yes_no it will be mapped to Boolean correctly.
In the hibernate.reveng.xml I could use a mapping to java.lang.Boolean and add the type mapping to my velocity template which works fine.
Code:
@Type(type="ja_nein")
But when starting the application I get Exceptions that the mapping is not correct. Where can I tell Hibernate to use my JaNeinType with Annotations and to map it to a Boolean in my Java objects?
Rgds,
Axel