Opened 5 years ago
Last modified 5 years ago
#31148 closed Cleanup/optimization
Can not update unioned queryset after union. — at Version 2
Reported by: | Joon Hwan 김준환 | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Hasan Ramezani | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
b_filter() seems to merge but does not apply to the actual update
q = M.objects.none() q = q.union(M.objects.a_filter()) print(q) q = q.union(M.objects.b_filter()) print(q) q.update(name='foo')
<QuerySet [<M: M object (675)>]> <QuerySet [<M: M object (675)>, <M: M object (773)>]> UPDATE "m" SET "name" = "foo" WHERE `a_filter Conditional statement` ORDER BY U0."id" ASC LIMIT 1); args=(...)
Change History (2)
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.