On Friday, September 27, 2013 12:17:26 AM UTC+3, Xof wrote:

> I also think we *really* need to push execution of this functionality into 
> the database rather than having the Django core do it, if we're going to be 
> making more use of on_delete. 
>

Do you mean that cascading deletes should be handled by the DB, or just 
modifying the DB constraints to match on_delete (that is, use foreign key 
on delete cascade/set null/...)?

Doing cascades automatically in the DB will not work due to how signals are 
handled. However, adding a new option to on_delete, something like 
on_delete=DB_CASCADE could work. Just document that you wont get delete 
signals for the cascades in this case. But you get a lot faster deletion 
code, and automatically get constraints created in the DB with on delete 
cascade option. Maybe there could even be safety check for signals, Django 
could spot if you have delete signals registered for possible cascades.

 - Anssi

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to