| Author |
clone collection and save the realtion between the entries in the collection
|
avihai marchiano
Ranch Hand
Joined: Jan 10, 2007
Posts: 342
|
|
Hey, I suspect that there is no generic solution for this question , but i will try. I have a collection (A) of entities (ejb3 ) "Foo" i need to clone this collection and to clean the data base id from the entities . After clone i have a clone collection (B) The issue is that i need to save in the DB the new clone collection and after i save i need know which entity in B is clone of which entity in A.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
You can only do this if you have another unique property (or combination of properties) of the beans, such as the name. After all, there has to be a way to tell that two objects are still equal even though the ID has changed.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
avihai marchiano
Ranch Hand
Joined: Jan 10, 2007
Posts: 342
|
|
Yep, that what i thought. i try to see if someone else will find a creative idea , but i guess there isnt. Thank you
|
 |
 |
|
|
subject: clone collection and save the realtion between the entries in the collection
|
|
|