#28010: Add support for SELECT...FOR UPDATE OF
-------------------------------------+-------------------------------------
Reporter: Ran Benita | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
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 Ran Benita):
Thanks for testing, Adam. I did not think of this scenario.
Please correct me of the following is incorrect:
Reverse OneToOne fields are nullable (might not exist on the other side),
and Django does not allow select_for_update on such fields (you get
"django.db.utils.NotSupportedError: FOR UPDATE cannot be applied to the
nullable side of an outer join"). Hence, including such a field in
`of=(...)` should not be allowed. In fact, in order to use
`select_for_update` at all on such a query, you must use `of=(...)`
*excluding* the reverse field, otherwise it will fail with the error
above.
--
Ticket URL: <https://code.djangoproject.com/ticket/28010#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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.1f65321f1eb0bcb543e6a9c23007f94b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.