Would lover love for users to be able to provide and use their identifier generator annotations (and of course have Hibernate understand what the heck they are talking about).
For example: {code} @Id @IncrementGenerated private Long id; {code}
And have {{IncrementGenerated}} expose a way to tell Hibernate what it means in terms of generation.
This follows along the same idea as {{org.hibernate.tuple.GeneratedValueGeneration}}
Also, I think it is a good idea to use {{javax.persistence.GeneratedValue}} here for portability reasons. I guess the strategy/type would be AUTO. The generator would just be blank? I.e.: {code} @Id @GeneratedValue @IncrementGenerated private Long id; {code}
WDYT?
|