#21174: Transaction handling broken in related manager modification methods
-------------------------------------+-------------------------------------
     Reporter:  akaariai             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:
  (models, ORM)                      |  1.6-beta-1
     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
-------------------------------------+-------------------------------------
Changes (by loic84):

 * cc: loic@… (added)


Comment:

 This also has the benefit of fixing #21169 for GFK
 RelatedManager.remove().

 The same applies to FK RelatedManager.remove() which also suffers from
 this issue. I would also implement it `self.using(db).filter(pk__in=[o.pk
 for o in objs]).delete()`, solving both transaction handling and default
 filtering at once.

 I've got the test cases for these stashed in a branch for #21169.

 One thing to note though is the mild backward incompatibility: signals
 won't be fired anymore.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21174#comment:2>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.10c5f9b1a375756a71515559cb425b17%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to