#35014: update_or_create using update_fields  opt out
-------------------------------------+-------------------------------------
     Reporter:  Jordan Hyatt         |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => wontfix
 * component:  Uncategorized => Database layer (models, ORM)
 * type:  Uncategorized => Cleanup/optimization


Comment:

 This is an intentional change mentioned in
 [https://docs.djangoproject.com/en/stable/releases/4.2/#setting-update-
 fields-in-model-save-may-now-be-required release notes].

 > That means developer's could count on the model save method being run
 and all fields being updated regardless of the defaults argument.

 I'm not sure how you use this. Are you talking about database triggers
 with some sophisticated behavior? If yes, then you can always pass all
 fields in `update_fields` or use triggers on rows (not particular column)
 update. I don't think it's worth additional complexity in Django itself.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/35014#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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018c3b6f906a-7e0dae02-b47c-485a-a3f2-3001b388d642-000000%40eu-central-1.amazonses.com.

Reply via email to