I'm updating our "visual preview" tool for edits, and ran into an issue.  

In order to best mimic the production view, I can't simply "clone" the 
objects any longer (they have way too many attributes and relationships) 
and must apply edits onto the real object.  

I'd like to ensure that changes can't persist, so the easiest way to mark 
the object "read only" was to expunge it from the session.  Perfect.

The problem I've run into, is that `expunge()` only applies to the actual 
object -- it doesn't apply to any of the loaded (lazy/eager/etc) 
relationships.  

Has anyone figured out way to do a recursive expunge?  I don't want to 
alter the cascades on the relationship, I just have one (or more) 
context(s) where I need to disassociate an object and any loaded children 
from the session.

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

Reply via email to