Right, "delete-orphan" is what adds the lifecycle relationship between parent and child. It means that the child can't exist without a parent. That lets SA know that it should eliminate the child rather than trying to null out the relationship.
You probably want "all" so that all actions performed on the parent will propagate to the child, which will remove the need to save children directly. See here also: http://www.sqlalchemy.org/docs/unitofwork.myt#unitofwork_cascade Cheers, Luke On Feb 11, 1:49 pm, "Nebur" <[EMAIL PROTECTED]> wrote: > > The minimum correction of my above code seems to be 2 lines: > > > 1.The cascade rule changed from "delete" into "all,delete-orphan" > > No, it turned out there is a still smaller change: > The cascade rule changed from "delete" into "delete, delete-orphan" > will work, too. > The delete-orphan makes up the difference. > Ruben --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---