#28600: Add prefetch related support to RawQuerySet
-------------------------------------+-------------------------------------
Reporter: Adnan Umer | Owner: Adnan
| Umer
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* cc: Carlton Gibson (added)
Comment:
Replying to [comment:10 Adnan Umer]:
> Replying to [comment:9 Simon Charette]:
> > Unless `__bool__` and `__len__` support is required for
`prefetch_related` to work they should be added/tracked in another
PR/ticket.
>
> Got that. Moving that to separate PR.
Did that happen? (I
[https://github.com/django/django/pulls?utf8=✓&q=is%3Apr+author%3Auadnan
can't see another PR by Adnan])
I ask because the warning in
[https://github.com/django/django/blob/7a22d9f75125e3cfbea0979a876efe4634f6fe05/docs/topics/db/sql.txt#L88-L97
docs/db/sql.txt] about this will also need updating:
`__bool__()` and `__len__()` are not defined in `RawQuerySet`, and
thus all ``RawQuerySet`` instances are considered `True`. The reason
these methods are not implemented in `RawQuerySet` is that
implementing
them without internal caching would be a performance drawback and
adding
such caching would be backward incompatible.
--
Ticket URL: <https://code.djangoproject.com/ticket/28600#comment:20>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.0068e183212b2ca46a2db67e0bd542ce%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.