JPA, Hibernate: Custom primary key generator, before persist
843859Jun 22 2009 — edited Jun 23 2009Hello,
I'm working with JPA and Hibernate, and project requirement is to have primary key (id) value in application, before entity is persisted. JPA and Hibernate have techniques for generating id's during persist, but I need those id's before, and I need them to be unique. Is there already conventional solution for this?
If not, what are suggestions? Creating new entity and new database table just for id's?