#34728: OR operator on queryset does not work as expected
-------------------------------------+-------------------------------------
Reporter: Kbleser | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 4.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: queryset OR | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak):
Replying to [comment:4 René Fleschenberg]:
> BTW, on Discord, there has been another report about {{{qs1 | qs2}}} and
{{{qs2 | qs1}}} not being equivalent, which they should be according to
the docs. This is probably outside of the scope of this ticket, but I
thought it's worth mentioning here (maybe we can fix both issues in one
go).
Queries may **not** be the same according to
[https://docs.djangoproject.com/en/dev/ref/models/querysets/#or docs],
check out #33319:
> ''"| is not a commutative operation, as different (though equivalent)
queries may be generated."''
--
Ticket URL: <https://code.djangoproject.com/ticket/34728#comment:5>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018977b8a82e-8a37584e-6559-4cf0-9015-3809983998ff-000000%40eu-central-1.amazonses.com.