Hello
what kind of entity id generation strategy do I have do define, by the following scenario:
my current entity id annotation is:
Code:
@Id @GeneratedValue
public int getId() {
return _id;
}
The scenario is:
1. let hibernate create my db schema by
hibernate.hbm2ddl.auto = create 2. import data 'manually' (ant, not hibernate)
3. run the application with hibernate and the setting
hibernate.hbm2ddl.auto = validate=> causes the following execption
Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: ...I'm aware that I confused hibernates id generation, because I imported the entries manually.
Is there a way to update hibernates id counter?
Thank you for any hint.
Regards,
Andrae