mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #32483 -- Fixed QuerySet.values()/values_list() on JSONField key transforms with booleans on SQLite.
Thanks Matthew Cornell for the report.
This commit is contained in:
parent
c4df8b86c7
commit
71ec102b01
4 changed files with 30 additions and 33 deletions
|
@ -695,12 +695,6 @@ You can also refer to fields on related models with reverse relations through
|
|||
pronounced if you include multiple such fields in your ``values()`` query,
|
||||
in which case all possible combinations will be returned.
|
||||
|
||||
.. admonition:: Boolean values for ``JSONField`` on SQLite
|
||||
|
||||
Due to the way the ``JSON_EXTRACT`` SQL function is implemented on SQLite,
|
||||
``values()`` will return ``1`` and ``0`` instead of ``True`` and ``False``
|
||||
for :class:`~django.db.models.JSONField` key transforms.
|
||||
|
||||
``values_list()``
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -771,12 +765,6 @@ not having any author::
|
|||
>>> Entry.objects.values_list('authors')
|
||||
<QuerySet [('Noam Chomsky',), ('George Orwell',), (None,)]>
|
||||
|
||||
.. admonition:: Boolean values for ``JSONField`` on SQLite
|
||||
|
||||
Due to the way the ``JSON_EXTRACT`` SQL function is implemented on SQLite,
|
||||
``values_list()`` will return ``1`` and ``0`` instead of ``True`` and
|
||||
``False`` for :class:`~django.db.models.JSONField` key transforms.
|
||||
|
||||
``dates()``
|
||||
~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue