Skip to content

Commit 7fd38fd

Browse files
committed
RM feedback
1 parent bdaff83 commit 7fd38fd

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

source/model-data/models.txt

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ that {+django-odm+} supports:
104104
- | Stores an IPv4 or IPv6 address in string format.
105105

106106
* - ``IntegerField``
107-
- | Stores integer values.
107+
- | Stores integer values up to 32 bits in size.
108108

109109
* - ``JSONField``
110110
- | Stores JSON data. To learn more about this field, see the
@@ -297,7 +297,7 @@ class that includes the following information:
297297
Use Advanced Fields
298298
-------------------
299299

300-
This section how to use the following field types
300+
This section shows how to use the following field types
301301
in your Django models:
302302

303303
- :ref:`JSONField <django-models-json>`
@@ -321,19 +321,6 @@ stores this data in BSON, or Binary JSON, format.
321321
MongoDB ``Object``. To learn more about this field, see the
322322
:ref:`django-models-embedded` section of this guide.
323323

324-
{+django-odm+}'s support for ``JSONField`` has the following limitations:
325-
326-
- If you set the field's value to ``None``, {+django-odm+} stores its value as
327-
a SQL ``NULL`` value. Alternatively, you can set the ``JSONField`` value
328-
to ``Value(None, JSONField())``, which represents the JSON scalar ``null``.
329-
However, there is no way to distinguish between the SQL ``NULL`` and the JSON
330-
``null`` when querying.
331-
332-
- Some queries that use ``Q`` objects might not return the expected results.
333-
334-
- When querying for fields that have a ``None`` value, {+django-odm+} incorrectly
335-
returns documents in which the field doesn't exist.
336-
337324
Example
338325
```````
339326

@@ -354,6 +341,23 @@ user ratings for each ``Movie`` object:
354341
To learn how to query data stored in a ``JSONField``, see
355342
:ref:`django-query-jsonfield` in the Specify a Query guide.
356343

344+
Limitations
345+
```````````
346+
347+
{+django-odm+}'s support for ``JSONField`` has the following limitations:
348+
349+
- If you set the field's value to ``None``, {+django-odm+} stores its value as
350+
a SQL ``NULL`` value. Alternatively, you can set the ``JSONField`` value
351+
to ``Value(None, JSONField())``, which represents the JSON scalar ``null``.
352+
However, there is no way to distinguish between the SQL ``NULL`` and the JSON
353+
``null`` when querying.
354+
355+
- Some queries that use ``Q`` objects might not return the expected results,
356+
particularly when using the ``QuerySet.exclude()`` method.
357+
358+
- When querying for fields that have a ``None`` value, {+django-odm+} incorrectly
359+
returns documents in which the field doesn't exist.
360+
357361
.. _django-models-array:
358362

359363
Use an ArrayField

0 commit comments

Comments
 (0)