These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Could not save object / no collection snapshot for orphan de
PostPosted: Thu Oct 11, 2007 11:21 am 
Newbie

Joined: Thu Oct 27, 2005 9:23 am
Posts: 5
Hi,

if I session.Save an object, do a session.Delete after that, and do then again the session.Save (all on the same object!) I get this exception if the object has mapped collections with cascade="all-delete-orphan":

Could not save object / no collection snapshot for orphan delete

The problem is, that the collection belonging to the object is still bound to the session. Even a session.Evict on the object does not remove the collection from the session (only the snapshot is removed). But if I Evict an object from the session I want NHibernate to deal my object as transient, so that I can do a Save again.

Background: I'm implementing undo/redo. So I save a reference to the to be deleted object in a command object.

Any hints?


Hibernate version:
1.2.0


Sincerely,
Stefan Lieser


Top
 Profile  
 
 Post subject: Re: Could not save object / no collection snapshot for orpha
PostPosted: Wed Oct 24, 2007 5:00 am 
Newbie

Joined: Thu Oct 27, 2005 9:23 am
Posts: 5
Hi,

I opened an issue on Jira some days ago: http://jira.nhibernate.org/browse/NH-1177

It contains a VS2005 solution that reproduces the error.


Sincerely,
Stefan Lieser


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.