We are using the "native" generator strategy for generating the Id of a particular java class in the database. This works only for Java types like Integer, Long, Short and String. When we put a UserType as the id type we get an exception as the one below
org.hibernate.id.IdentifierGenerationException: this id generator generates long, integer, short or string
<id name="id" type="TaskIDUserType">
<column name="id" />
<generator class="native" />
</id>
My question is does hibernate not support UserTypes for id generation ? Is there a request for having this included in the future ? since we can read using the UserType but not generate the Id using the UserType. Appreciate all your responses.
|