On Jan 17, 2008, at 8:03 PM, Michael Bayer wrote:
> > > On Jan 17, 2008, at 7:51 PM, Rick Morrison wrote: > >> An expunge on an collection remove that creates an orphan wouldn't >> be a surprise to me; I'm surprised that it doesn't do that now. >> >> +1 for error on case 1 plus auto-remove in case 2 > > > would the expunge happen at attribute change time or at flush time? > > does that expunge cascade through the expunged object too ? > > what if the expunged object references things that are persistent ? > do we expunge them still ? > > what if the expunged object references other pending objects, but they > are valid, and might even be referenced by other, valid pending/ > persistent objects in the session ? do we expunge those ? > > seems like a ton of guesswork....which is why i prefer the developer > to have a clue whats in and whats not in his or her session before > flushing...... > this is based on the fact that "expunge" has its own "cascade" path. if we say, expunge along the "delete-orphan" path, thats something different so maybe that would work, still seems a little creepy to me. I think the expunge has to happen as an on-attribute event though, otherwise we'd have to track that action somewhere. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---