In fact, I was using the default (ON DELETE NO ACTION) but I realized that the parent was deleted even if it a had child. I understand that SA as of 0.4 will not let NO ACTION nor RESTRICT be fired.
I prefer put constraints in database rather than in application/ framework because several applications can access the same database and applications can gone quicker than DB. Fortunately, NOT NULL FKs fills my need. On 9 sep, 16:52, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Sep 9, 2007, at 5:09 AM, Jean-Philippe Dutreve wrote: > > > > > Another solution could be to inverse the order: > > - first delete the parent (so the rule RESTRICT is immediately fired) > > - second set null the FKs. > > that would *really* add complexity to the core code just to support > this feature. FTR i had never really heard of anyone using ON DELETE > RESTRICT before this. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---