Beginner |
 |
Joined: Thu Jan 04, 2007 5:44 am Posts: 26 Location: Innsbruck - Sivas(TR) - Bregenz
|
Hi,
I have a order-wizard in my crm software. My order objcet has some articles as childs (collection). I implement a cancel meachanism, that means I want the old state when the user cancel the orderwizard. thats means I have a copyArticles collection in order which i fill in with the new articles (copy of articles new Article()<--new objects in loop) before i start the wizard... when user click cancel i clear "Articles" collection and add the articles from the "copyArticles" collection to it.
ok before i say session.save(..) and transaction.commit() it is all okay in object view.. but when i say commit() i have the exception..
"a different object with the same identifier value was already associated with the session..."
i know i have some "Article" objects which have the same id but different object identifier...
my target is to detach the articles and reaattch the article from copyArticle.. is this possible in hibernate??
thx for your answers
|
|