[sqlalchemy] Re: Orphans not deleted using cascade parameter

2008-08-29 Thread Alex Mathieu
Hi Michael, I had the same problem for a while. I'm not exactly sure what I did in order to fix this (have 2 ideas in my mind, need to figure out which of it it was). As soon as I remember, I'll let you know. On Aug 29, 1:44 am, Michael Brickenstein [EMAIL PROTECTED] wrote: Hi! Hi have a

[sqlalchemy] Re: Orphans not deleted using cascade parameter

2008-08-27 Thread Alex Mathieu
, in advance On Aug 26, 11:35 pm, Michael Bayer [EMAIL PROTECTED] wrote: On Aug 26, 2008, at 6:08 PM, Alex Mathieu wrote: Let's say I have two classes: class PublicationElement(Entity):    using_options(tablename='publication')    sections = OneToMany('SectionElement')    covers = OneToMany

[sqlalchemy] Re: Orphans not deleted using cascade parameter

2008-08-27 Thread Alex Mathieu
27, 9:26 am, Alex Mathieu [EMAIL PROTECTED] wrote: Hi Michael, I've switch my definition to the following: class PublicationElement(Entity):     using_options(tablename='publication')     sections = OneToMany('SectionElement')     covers = OneToMany('PublicationCoverElement

[sqlalchemy] Re: Orphans not deleted using cascade parameter

2008-08-27 Thread Alex Mathieu
27, 2008, at 10:48 AM, Alex Mathieu wrote: F*ck... I just realized that I was using  MyISAM table engine... here's the deal then... I cannot use InnoDB for this projet so I think I will be writing some recursive code that can determine if an object has childs dependencies

[sqlalchemy] Re: Orphans not deleted using cascade parameter

2008-08-27 Thread Alex Mathieu
Thanks Michael, I'll have a look over this !! Bob, thanks also for your help, however, I'm not able to use the code... maybe the indention is wrong here or I don't know... I was able to execute the function, but even by putting a print as the first line of the function, nothing got printed out,

[sqlalchemy] Orphans not deleted using cascade parameter

2008-08-26 Thread Alex Mathieu
Hi all, I'm using Elixir SQLAlchemy to manage some entities, it's going quite well. However, I just realize that when I was deleting my parents entities, my sons entites were not deleted. The're might be something I didn't get quite well, so that's why I'm requiring some help... Let's say I

[sqlalchemy] Re: Orphans not deleted using cascade parameter

2008-08-26 Thread Alex Mathieu
in my child element to zero, instead of deleting it (and now SA is complaining because that foreign key is the primary key of the table). Any idea on why it tries to put the key to 0 instead of deleting the whole child object ? On Aug 26, 6:08 pm, Alex Mathieu [EMAIL PROTECTED] wrote: Hi all, I'm