On Apr 16, 2008, at 7:59 PM, David Harrison wrote:

>
> On 17/04/2008, Michael Bayer <[EMAIL PROTECTED]> wrote:
>>
>>
>> On Apr 16, 2008, at 6:21 PM, David Harrison wrote:
>>
>>>
>>> If I use "delete, delete-orphan" I get the same errors
>>
>>
>>
>> Like I mentioned, "delete-orphan" doesn't work very well separated
>> from "delete" cascade - which means that its only appropriate for a
>> one-to-many or one-to-one relation.   When many "Friendship" rows
>> reference the same "Dog" row, the deletion of any "Friendship" row
>> cascades to the "Dog" row (since delete cascade is implied by delete-
>> orphan cascade) and the constraint fails.
>>
>> "delete-orphan" was never designed to track many parents, its just a
>> convenience feature for the typical "owned by one parent" use case.
>
> Why does MySQL and SQLite behave as I expect, but Postgres doesn't  
> though ?


they dont behave like you expect; they dont respect foreign keys, so  
your database is in a slightly corrupted state after the operation  
completes.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to