Re: queryset.delete() ON DELETE ...

2011-09-27 Thread Jacob Kaplan-Moss
On Tue, Sep 27, 2011 at 8:30 AM, Thomas Guettler wrote: > it seems, that the django ORM can only do deletes which result in a lot > of SQL-Queries to do "on delete cascade" in python code. > > https://docs.djangoproject.com/en/1.3/ref/models/querysets/#delete > > Is there a way to leave this up to

Re: queryset.delete() ON DELETE ...

2011-09-27 Thread Lucian Nicolescu
AFAIK you can only call delete() on each separate member of the result and overwrite the models's delete() method where you decide wether to delete or not. Lucian On Tue, Sep 27, 2011 at 4:30 PM, Thomas Guettler wrote: > Hi, > > it seems, that the django ORM can only do deletes which result in

queryset.delete() ON DELETE ...

2011-09-27 Thread Thomas Guettler
Hi, it seems, that the django ORM can only do deletes which result in a lot of SQL-Queries to do "on delete cascade" in python code. https://docs.djangoproject.com/en/1.3/ref/models/querysets/#delete Is there a way to leave this up to the database? I know that you can give the ForeignKey the on