integrity « Key « JPA Q&A





1. one-to-many not picking up parent key? Integrity violation!    forum.hibernate.org

Description of problem: When using the code below, I'm getting an Integrity Violation when trying to save the encapsulating class. The exception is thrown on the tx.commit() line. Looking at the data actually stored into the database via the HSQL command line, I see the WorkingSet created, I see either none or 1 of the WorkingTasks created, but the set_id is ...

2. Please help: many-to-one Duplicate key or integrity constrai    forum.hibernate.org

The problem: As soon as i add the many-to-one associations to my hibernate mapped User class below i get a Duplicate key or integrity constraint violation. Basically the problem is that the user.getId property does not seem to get recognised and passed to the sql. I have also noticed that if i search (HQL) on any field mapped via the association ...