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!

Big Structures with referenced Objects that can be equal doesn't work well

533724Sep 14 2006 — edited Sep 18 2006
Hi,
I want to write big constructs using toplink.
the structure consists of 2 elements. A PartsList element and an Item element. A PartsList can contain Items and PartsLists.
Both kinds of elements are identified by their unique keys in business logic.

The first problem i had was that if i had a PartsList A, that contained Partslists A1, A2 and A3, the Items of A1, A2 and A3 could be partially identical (by unique key). If i wanted to register the PartsList A using uow.deepMergeClone(A), there was thrown an Exception, because Toplink wanted to insert this Item Bx, that is equal in A1 AND i.e. in A3. (Unique key constraint problem).

So i tried to register each single element in the UOW, commit it and read it again to replace it in my structure. that worked, but the problem is, that such a structure has around 30000 elements. the whole insertion task takes so about 20 minutes. That is definitely too much for a database query.

Has somebody a hint, how to insert this PartsList efficiently?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2006
Added on Sep 14 2006
4 comments
1,116 views