#16865: get_or_create defaults to _for_write even when it's just reading
-------------------------------------+-------------------------------------
     Reporter:  Rick van Hattem      |                    Owner:  nobody
  <Rick.van.Hattem@…>                |                   Status:  new
         Type:  Bug                  |                  Version:  1.3
    Component:  Database layer       |               Resolution:
  (models, ORM)                      |             Triage Stage:  Accepted
     Severity:  Normal               |      Needs documentation:  0
     Keywords:                       |  Patch needs improvement:  0
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  1                    |
-------------------------------------+-------------------------------------
Changes (by noria):

 * has_patch:  0 => 1


Comment:

 This patch do what we can expect: [[BR]]
 if the object does not exist on the first db (read db) and if the read db
 is different than the write db, [[BR]]
 then we retry the get() on the write db, [[BR]]
 else we re-raise a new DoesNotExist exception.[[BR]]
 [[BR]]
 I prefer if someone who is 'experimented' could check this.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16865#comment:7>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to