#32651: Combining Q with a Q containing Exists crashes
-------------------------------------+-------------------------------------
Reporter: Jaap Roes | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 3.2
(models, ORM) |
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):
* cc: Simon Charette (added)
Comment:
Replying to [comment:5 Jaap Roes]:
> @Mariusz Nice! Does that backport also fix the weird behaviour in my
previous comment?
Unfortunately no, it's a separate issue related with the way how
`Exists.__invert__()` and `Subquery.__getstate__()` are defined. It's
quite serious, see
{{{
q = Exists(Employee.objects.all())
assert hash(q) != hash(~q)
}}}
Can you create a separate ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/32651#comment:7>
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/063.f5d3ff1f61f6b8e220cd7230b7dc95ae%40djangoproject.com.