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!

1:1 Mapping with Bidirectional relationship.

590594Jul 30 2007 — edited Aug 7 2007
We have two table Order & Order_Billing.
The primary key of the Order table is Order_Id which is also the foreign key of the Order_Billing table.

The primary key of the Order_Billing table is order_billing_id which is again the forign key in the order table.

All the primary keys are getting generated using oracle database sequence.

We want to persist the Object Order using TopLink which should automatically persist the OrderBilling object maintaining the bi-directional relationship.

As per our current design, we are having Order object which has the OrderBilling object as an attribute.
While saving the Order object TopLink is making an entry in the Order_Billing table for the OrderBilling object but the order_id is not getting populated in the Order_Billing table where as the order_billing_id is properly getting set in the order table.

Please suggest how to go for it.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2007
Added on Jul 30 2007
7 comments
1,054 views