#20429: Add QuerySet.update_or_create method
-------------------------------------+-------------------------------------
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: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by tunixman):
If you're not enforcing uniqueness constraints in the database you're
going to have this race condition no matter what. Perhaps the
documentation around creating models and the basics of the tutorials could
be updated to reflect this. Documenting it as something endemic only to
these methods does nothing to improve the data consistency of Django
applications and would rather just discourage people from using these
methods which are basically the codification of the proper way to handle
these cases along side proper database implementation.
--
Ticket URL: <https://code.djangoproject.com/ticket/20429#comment:23>
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/066.53b3c32a6e490a216a2c7d2dd5825498%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.