Hi,

We use following scenario:
1) To statefull session we add object (SaveOrUpdate()) that contains 
collection and inside this collection one item is to be deleted. This 
object is created from data transfer object.
2) We call session.Flush();
3) We add another object to session that we want to be persisted at the 
end, but inside same transaction (SaveOrUpdate()).
4) We call session.Flush();
5) Stale state object exception is raised because during cascade the 
residing object and its collection is cascaded again and to be deleted item 
is tried to be deleted again.
6) We planned to execute Commit to complete transaction, but this obviously 
never happens.

Mapping uses inverse true and cascade all or cascade all-delete-orphan. All 
raises same exception.

Does it mean that when doing flush twice NHibernate does not deal with 
collection item deletes correctly and does not remember not to delete the 
collection item again? Other collection items like updates or inserts are 
not doubled.


Could you please send some help how to solve this issue? I searched 
everywhere, but no good answers except for some idea to reasign all whole 
collections again.

Thank you.

BR
Olin

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to