#19580: Unify reverse foreign key and m2m unsaved model querying
-------------------------------------+-------------------------------------
Reporter: Anssi Kääriäinen | Owner: raydeal
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Adam Sołtysik):
I agree with the above. Why does something like this (where `self` is an
unsaved `User` instance)
{{{Book.objects.filter(author=self).exists()}}}
display a proper `RemovedInDjango50Warning`, while equivalent
{{{self.books.exists()}}}
suddenly crashes? This is totally unexpected.
--
Ticket URL: <https://code.djangoproject.com/ticket/19580#comment:59>
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/0107018d0df8e9de-77692f4d-2f34-4215-9acb-ff5ecea8b415-000000%40eu-central-1.amazonses.com.