#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 Adam Chidlow):

 Hi Ran, I'm using `select_for_update` from the reverse side of a
 OneToOneField succesfuly, it just requires that you
 `exclude(<related_field>=None)` as well.

 This is what I'm working with at the moment to be able to use `of=` as
 well:
 
https://github.com/achidlow/django/commit/83fa6963a0b4b9f02c88b3abc84e20bce60d9035

 (I'm not familiar with django's SQL internals so I don't know if that's
 the right fix, and in the unlikely event that it is, `_get_field_choices`
 also needs updating. However it's working for me right now)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28010#comment:9>
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.880ace8a3037ad493ed31488e109a193%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to