Guys,
I have three tables as follows:
Table1
_______
ID | R_ID
Table 2
_______
ID
Table3
_______
ID
Now Table1->R_ID is mapped to Table2->ID and
Table2 -> ID is mapped to Table3 -> ID
R_ID is a generated by a Sequence in the Table1 entity...And I want it to be reflected the same in the Table2 and Table3. Thats the reason, I added foreign key constraint as shown above
Now when ever I do
em.persist(table1);
em.persist(table2);
em.persist(table3);
I am getting parent key not found error...what am I doing wrong...is there something wrong with my database design
-Amor
[Message sent by forum member 'amorous' (amorous)]
http://forums.java.net/jive/thread.jspa?messageID=328773