#21257: ForeignKey on_delete functionality should traverse (cascade, ha ha) to 
the
DB backend
-------------------------------+--------------------
     Reporter:  gcbirzan       |      Owner:  nobody
         Type:  New feature    |     Status:  new
    Component:  Uncategorized  |    Version:  master
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 By default, django creates FKs without an explicit ON DELETE on the
 backend. This, if nothing else, should be configurable. If for no other
 reason that when using some transaction isolation modes, the error
 returned by the backend will be the wrong one during concurrent
 modifications:

 Table b links to table a. You insert in table b a link to ID 1 in a, at
 the same time as you delete it from a.

 With the default (at least in PostgreSQL), in REPEATABLE READ, the error
 is IntegrityError, which is wrong, since in fact you should just retry the
 transaction. In lower isolation levels, the FK is deleted (as expected),
 though, granted the on delete signals are not called.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21257>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.1937a081e50737b921f03b3b7f42d11f%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to