Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.2.3.ga
Name and version of the database you are using: HSQL
I have implemented a UserType which I intend to use on a String property.
However I ran into and issue where the nullSafeGet and the nullSafeSet methods get called only if the entity has an @Id field with the @GeneratedValue annotation.
here's how i use the type
class Identity {
@Id
private Long id;
@Type(type="x.x.XType")
private String name;
}
When i save the class mentioned above the nullSafeSet and the nullSafeGet method in XType does not get executed when i persist the object.
change it to
class Identity {
@Id
@GeneratedValue
private Long id;
@Type(type="x.x.XType")
private String name;
}
and it works fine