SQLAlchemy's "cascade='all, delete-orphan'" implements the same CASCADE 
functionality as ONDELETE does, in Python.   It is just less efficient since 
collections need to be fully loaded into memory for them to be processed.

On Jul 30, 2011, at 1:49 PM, Aviv Giladi wrote:

> Thank you for your response.
> 
> In that case, how do you manage these kinds of situations in SQLite
> and other engines in MySQL?
> Do you manually delete the children as well?
> 
> On Jul 28, 10:35 am, Stefano Fontanelli <s.fontane...@asidev.com>
> wrote:
>> Il 28/07/11 01.15, Aviv Giladi ha scritto:
>> 
>>> Hi,
>> 
>>> I am actually using both MySQL and SQLite (one on the dev machine, one
>>> on the server).
>>> Does that make a difference?
>> 
>> ONDELETE and ONUPDATE don't work on SQLite and MySQL MyISAM.
>> You must change your database to test them.
>> In MySQL you can create your database and tables as InnoDB.
>> 
>> Regards,
>> Stefano.
> 
> -- 
> 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.
> 

-- 
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.

Reply via email to