[sqlalchemy] Re: Postgres cascade error ?

2008-04-16 Thread Michael Bayer
On Apr 15, 2008, at 10:32 PM, Dave Harrison wrote: Hey all, The below code establishes 3 tables (house, dog, owner) and a mapper table to associate owners and dogs (friendships). When I use either MySQL (5.0.51) or SQLite (3.4.2) as the backend, this code works correctly. However when

[sqlalchemy] Re: Postgres cascade error ?

2008-04-16 Thread David Harrison
On 17/04/2008, Michael Bayer [EMAIL PROTECTED] wrote: On Apr 15, 2008, at 10:32 PM, Dave Harrison wrote: Hey all, The below code establishes 3 tables (house, dog, owner) and a mapper table to associate owners and dogs (friendships). When I use either MySQL (5.0.51) or

[sqlalchemy] Re: Postgres cascade error ?

2008-04-16 Thread Michael Bayer
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

[sqlalchemy] Re: Postgres cascade error ?

2008-04-16 Thread Michael Bayer
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

[sqlalchemy] Re: Postgres cascade error ?

2008-04-16 Thread Eric Ongerth
On Apr 16, 7:24 am, Michael Bayer [EMAIL PROTECTED] wrote: always use delete cascade in conjunction with delete-orphan. It doesnt make much sense to have delete-orphan only and not delete cascade. Oh wow. That clears up a few things for me. I don't remember ever seeing this (or at

[sqlalchemy] Re: Postgres cascade error ?

2008-04-16 Thread David Harrison
On 17/04/2008, Michael Bayer [EMAIL PROTECTED] wrote: On Apr 16, 2008, at 9:31 PM, Eric Ongerth wrote: On Apr 16, 7:24 am, Michael Bayer [EMAIL PROTECTED] wrote: always use delete cascade in conjunction with delete-orphan. It doesnt make much sense to have delete-orphan only