mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #29337 -- Added __len__() & __bool__() to RawQuerySet.
This commit is contained in:
parent
ec0319ff82
commit
f2026ca5e2
3 changed files with 16 additions and 8 deletions
|
@ -85,14 +85,6 @@ options that make it very powerful.
|
|||
both rows will match. To prevent this, perform the correct typecasting
|
||||
before using the value in a query.
|
||||
|
||||
.. warning::
|
||||
|
||||
While a ``RawQuerySet`` instance can be iterated over like a normal
|
||||
:class:`~django.db.models.query.QuerySet`, ``RawQuerySet`` doesn't
|
||||
implement all methods you can use with ``QuerySet``. For example,
|
||||
``__bool__()`` and ``__len__()`` are not defined in ``RawQuerySet``, and
|
||||
thus all ``RawQuerySet`` instances are considered ``True``.
|
||||
|
||||
Mapping query fields to model fields
|
||||
------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue