well, if your entity has already an ID, and you invoke
entitymanager.persist(bla)
Hibernate will think you are trying to persist an already existing entity, and he will react giving this stern and cryptic error message.
Just set the ID to null and you will smile again.
When mapping an entity to another, NEVER map the ID!
Wednesday, March 2, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment