On Oct 29, 5:32 pm, "Michael Bayer" <mike...@zzzcomputing.com> wrote:
> how would the UOW "honor" RESTRICT ? if you tell it to delete a parent, > and you didn't tell it to delete a child, and you have a non-nullable FK > or RESTRICT, you'd expect it to....throw an error, right ? isn't that > what happens here ? Well I don't know if we understand each other. If I have a ForeignKey defined with ondelete='RESTRICT', and I delete the parent, no errors are thrown. This only becomes apperent when you have a foreign key that is NOT defined as non-nullable. Even if you define it to be non-nullable, the error thrown when you try to delete the parent is not "update or delete on table <parent_table> violates foreign key constraint", but "null value in column <child_column> violates not-null constraint". I've created a ticket (http://www.sqlalchemy.org/trac/ticket/1594) with more details and a test case to make it clearer. --~--~---------~--~----~------------~-------~--~----~ 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 sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---