Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

parent key not found error via a two level One-To-Many relationship

696567Apr 20 2009 — edited Dec 13 2011
Dear All,

I try to abstract my problem as clear as possible.
I have the following mapping involving three entities A, B, and C.
The relationship is that A contain a collection of B, which in turn contains a collection of C.

when I tried the code.
A a = retrievedFromDatabase();
B b= new B();
.
.
C c = new C();

b.add(c)
a.add(b)
merge(a)

then the "parent key not found" on table of c.

I don't have such a problem when I simply

A a = retrievedFromDatabase();
B b= new B();
a.add(b);
merge(a);


could someone tell me the reason ?

thanks in advance
Zhiqiang


Edited by: user5306236 on Apr 20, 2009 4:04 PM

Edited by: user5306236 on Apr 20, 2009 4:17 PM

Edited by: user5306236 on Apr 20, 2009 4:46 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 10 2012
Added on Apr 20 2009
8 comments
7,971 views