[Django] #21295: Add on_update support

34 views
Skip to first unread message

Django

unread,
Oct 20, 2013, 10:35:46 AM10/20/13
to django-...@googlegroups.com
#21295: Add on_update support
----------------------------------------------+--------------------
Reporter: akaariai | Owner: nobody
Type: New feature | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
There are cases where on-update cascade support would be useful. Currently
Django offers no way to cascade updates.

An experimental patch implementing on_update=models.CASCADE support for
foreign keys is available from:
https://github.com/akaariai/django/tree/update_cascade. It is based on
composite foreign keys branch
(https://github.com/akaariai/django/tree/soc2013/composite-fields).

I'll attach a sample project to this ticket. Unpack it, use the above
mentioned branch of Django, run syncdb, runserver and try in admin. Note
that the country/city names are stored locally in the models, so country
name update cascades to cities and from cities to streets.

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

Django

unread,
Oct 20, 2013, 10:36:56 AM10/20/13
to django-...@googlegroups.com
#21295: Add on_update support
-------------------------------------+-------------------------------------

Reporter: akaariai | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by akaariai):

* needs_better_patch: => 1
* needs_tests: => 0
* needs_docs: => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/21295#comment:1>

Django

unread,
Oct 20, 2013, 12:53:57 PM10/20/13
to django-...@googlegroups.com
#21295: Add on_update support
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by loic84):

* cc: loic@… (added)


Comment:

Awesome work.

I just had a brief look at the diff, it will need special handling to be
compatible with migrations, my patch for #21275 addresses this issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/21295#comment:2>

Django

unread,
Oct 21, 2013, 3:15:47 PM10/21/13
to django-...@googlegroups.com
#21295: Add on_update support
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 1
Has patch: 1 | Patch needs improvement: 1
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timo):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/21295#comment:3>

Django

unread,
Aug 2, 2016, 8:34:51 AM8/2/16
to django-...@googlegroups.com
#21295: Add on_update support
-------------------------------------+-------------------------------------
Reporter: akaariai | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by edmorley):

* cc: emorley@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/21295#comment:4>

Django

unread,
Jun 10, 2023, 3:04:49 AM6/10/23
to django-...@googlegroups.com
#21295: Add on_update support
-------------------------------------+-------------------------------------
Reporter: Anssi Kääriäinen | Owner: nobody

Type: New feature | Status: new
Component: Database layer | Version: dev

(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Akash Kumar Sen):

This seems to be a interesting topic to work on, but I am not sure about
the ideal behavior of the {{{on_update}}} parameter. Some explanation
would be very helpful. Are we talking about something similar to the SQL
{{{ON UPDATE}}} clause here?

--
Ticket URL: <https://code.djangoproject.com/ticket/21295#comment:5>

Django

unread,
Jun 10, 2023, 3:10:50 AM6/10/23
to django-...@googlegroups.com
#21295: Add on_update support
-------------------------------------+-------------------------------------
Reporter: Anssi Kääriäinen | Owner: nobody

Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Akash Kumar Sen):

* cc: Akash Kumar Sen (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/21295#comment:6>

Django

unread,
Feb 11, 2024, 12:19:28 PM2/11/24
to django-...@googlegroups.com
#21295: Add on_update support
-------------------------------------+-------------------------------------
Reporter: Anssi Kääriäinen | Owner: nobody

Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Giannis Terzopoulos):

* cc: Giannis Terzopoulos (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/21295#comment:7>

Django

unread,
Mar 12, 2024, 4:55:39 AM3/12/24
to django-...@googlegroups.com
#21295: Add on_update support
-------------------------------------+-------------------------------------
Reporter: Anssi Kääriäinen | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ülgen Sarıkavak):

* cc: Ülgen Sarıkavak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/21295#comment:8>

Django

unread,
May 15, 2024, 7:59:58 PM5/15/24
to django-...@googlegroups.com
#21295: Add on_update support
-------------------------------------+-------------------------------------
Reporter: Anssi Kääriäinen | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ryan Hiebert):

* cc: Ryan Hiebert (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/21295#comment:9>
Reply all
Reply to author
Forward
0 new messages