#2705: [patch] Add optional FOR UPDATE clause to QuerySets
---------------------------------------------------+------------------------
          Reporter:  Hawkeye                       |         Owner:  nobody
            Status:  new                           |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  SVN   
        Resolution:                                |      Keywords:        
             Stage:  Accepted                      |     Has_patch:  1     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  1                             |  
---------------------------------------------------+------------------------
Comment (by anih):

 Replying to [comment:36 liangent]:

 > in that marked line, if i don't specify force_update=True, it will do an
 INSERT, which will cause an IntegrityError. {{{ IntegrityError: (1062,
 "Duplicate entry '11' for key 1") }}}

 i try to reproduce this problem but without success, could you paste model
 file and separate some test?

 i send patch to trunk version with transaction.commit_unless_managed()
 inside select_for_update() (django/db/models/query.py)

 i dont have oracle to make some tests, but im using this patch with
 postgresql for about 1/2 year

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2705#comment:37>
Django <http://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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to