#27272: Protected objects not deleted even if they would have been deleted via
cascade anyway
-------------------------------------+-------------------------------------
     Reporter:  Daniel Izquierdo     |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.10
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the detailed analysis Daniele!

 The `on_delete` argument was introduced in
 616b30227d901a7452810a9ffaa55eaf186dc9e1 to fix #7539 where there was some
 discussion about `RESTRICT` but I cannot find a mention of why `PROTECT`
 work this way.

 I would argue that both `PROTECT` and `RESTRICT` can be useful and that
 `PROTECT` should be kept this way given some users might rely on its
 current behavior. What I would suggest we do here is introduce a new
 `on_delete=RESTRICT` handler that mimics what the SQL one does.

--
Ticket URL: <https://code.djangoproject.com/ticket/27272#comment:4>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.ce48595cdf8a867a1940ffc4545fa9c5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to