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.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
This is likely related to the mailing list conversation
https://docs.djangoproject.com/en/dev/ref/django-admin/#runserver-port-or-
address-port and the ticket #21127. Basically the consensus seems to be
that if we do push to the database it will be a new option to `on_delete`
in the FK declaration. This is also likely to be bundled with the removal
of a default behaviour for `on_delete`.
--
Ticket URL: <https://code.djangoproject.com/ticket/21257#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/21257#comment:2>
Comment (by anonymous):
I think the URL should be https://groups.google.com/forum/#!topic/django-
developers/FJMoGgtYIX4
Anyway, it is, but this doesn't involve any default behaviour change, so
it should be way easier.
--
Ticket URL: <https://code.djangoproject.com/ticket/21257#comment:3>
* component: Uncategorized => Database layer (models, ORM)
--
Ticket URL: <https://code.djangoproject.com/ticket/21257#comment:4>
* status: new => closed
* resolution: => duplicate
Comment:
Duplicate of #21961
--
Ticket URL: <https://code.djangoproject.com/ticket/21257#comment:5>