#21265: on_update foreign key
-------------------------------------+-------------------------------------
     Reporter:  mirzadelic1@…        |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  closed
    Component:  Database layer       |                  Version:  1.5
  (models, ORM)                      |               Resolution:  wontfix
     Severity:  Normal               |             Triage Stage:
     Keywords:  on_dalete,           |  Unreviewed
  foreignkey                         |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by akaariai):

 * status:  new => closed
 * needs_docs:   => 0
 * resolution:   => wontfix
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 No, there is currently no on_update functionality. In addition, it is
 unlikely that Django will ever officially support cascades for foreign
 keys targeting updatable primary keys. It is somewhat likely that
 updatable primary keys will be documented as unsupported.

 I am marking this as wontfix. This resolution is specifically about
 on_update for foreign keys targeting primary key values. I do support
 adding on_update support to foreign keys targeting other fields than the
 model's primary key.

 As a workaround you can manually alter the database constraints to be "ON
 UPDATE CASCADE".

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21265#comment:1>
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/079.53d5cd55d23d1012560bdf63b2e87364%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to