violation « Map « JPA Q&A





1. create of children fails with a foreign key violation    forum.hibernate.org

Hi, i create a bo1 object and a buch of bo2 children from a transport object in one step (code below). If i don't call Session.flush() before inserting the children, the insert of the children will fail due to a foreign key constraint in the database. The code is simular to the example in the reference manual, the main difference is ...

2. Foreign Key Violation in Parent Childs association    forum.hibernate.org

Hi. I'm having a problem when trying to save a object with childs, referencing the parent (Bidirectional Association). This is the exception: Code: [IBM][CLI Driver][DB2/NT] SQL0530N The insert or update value of the FOREIGN KEY "INTRANET.WF_EVENTOSWORKFLOW.FK_ESTADO_ORIGEN" is not equal to any value of the parent key of the parent table. SQLSTATE=23503 The stack trace in debug verbose is: Code: ...

3. unique key violation when storing a singleton object's map    forum.hibernate.org

Hi, It's hard to describe the question but I will try... We have a detached singleton object which has 2 maps (2 value maps, using association tables, unique constraints are added to the key columns). The accesses to the maps are guarded by 2 RW locks to make sure no threads can modify each map at the same time. Also, when ...