@@ -104,7 +104,7 @@ that {+django-odm+} supports:
104
104
- | Stores an IPv4 or IPv6 address in string format.
105
105
106
106
* - ``IntegerField``
107
- - | Stores integer values.
107
+ - | Stores integer values up to 32 bits in size .
108
108
109
109
* - ``JSONField``
110
110
- | Stores JSON data. To learn more about this field, see the
@@ -297,7 +297,7 @@ class that includes the following information:
297
297
Use Advanced Fields
298
298
-------------------
299
299
300
- This section how to use the following field types
300
+ This section shows how to use the following field types
301
301
in your Django models:
302
302
303
303
- :ref:`JSONField <django-models-json>`
@@ -321,19 +321,6 @@ stores this data in BSON, or Binary JSON, format.
321
321
MongoDB ``Object``. To learn more about this field, see the
322
322
:ref:`django-models-embedded` section of this guide.
323
323
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
-
337
324
Example
338
325
```````
339
326
@@ -354,6 +341,23 @@ user ratings for each ``Movie`` object:
354
341
To learn how to query data stored in a ``JSONField``, see
355
342
:ref:`django-query-jsonfield` in the Specify a Query guide.
356
343
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
+
357
361
.. _django-models-array:
358
362
359
363
Use an ArrayField
0 commit comments