> > Finally, note that I'm _not_ asking for sqlalchemy to maintain the > > collections for me. All I'm asking is for the cascade code not to > > attempt to delete objects that have already been deleted and flushed, > > or at least to safely handle the exception it raises when it does. > > OK, what behavior are you looking for ? it raises an exception right > now. whats "unsafe" about it ?
Well, it interrupts the cascading and leaves session.deleted in an inconsistent state where not all of the object's dependents may be included. I was under the assumption that this meant those dependents wouldn't be deleted, which would be a nightmare for trying to handle the exception. But it seems I was mistaken about that -- the flush finds and deletes the remaining dependents anyway. I could argue that leaving session.deleted in an inconsistent state is still a bad thing, but it's not nearly as severe as I had thought. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---