#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 René Fleschenberg):
Replying to [comment:5 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."''
I understand "equivalent" as "they will return the same set of results".
Is that not what the docs mean here?
--
Ticket URL: <https://code.djangoproject.com/ticket/34728#comment:6>
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/0107018977da114b-1b9f18c9-ba35-4cb2-bde2-c24db7dd78ab-000000%40eu-central-1.amazonses.com.