#20429: Implementation of update_or_create
-------------------------------------+-------------------------------------
     Reporter:  tunixman             |                    Owner:
         Type:  New feature          |  elektrrrus
    Component:  Database layer       |                   Status:  assigned
  (models, ORM)                      |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  1
  Needs tests:  1                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by tunixman):

 Using `update()` won't call `save` on the created or updated object
 
(https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.update),
 which is slightly different from the `get_or_create()` API
 (https://docs.djangoproject.com/en/dev/ref/models/querysets/#get-or-
 create). The difference may be something we should keep in mind when
 deciding on the final implementation. My preference is that they behave
 the same in this regard (i.e. `save()` is called with both functions).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20429#comment:8>
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].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to