summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-07-28 13:06:52 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-07-28 13:08:19 +0200
commit247bcef6b4f8625e80b6f07e264b7bbdf330194d (patch)
tree77f6aecfbafbf3d52ce84ca628d81581ddea62dd /docs
parent028a5f86f22d4be0746cbd38d09d6961024b2ef7 (diff)
[3.1.x] Fixed #31836 -- Dropped support for JSONField __contains and __contained_by lookups on SQLite.
The current implementation works only for basic examples without supporting nested structures and doesn't follow "the general principle that the contained object must match the containing object as to structure and data contents, possibly after discarding some non-matching array elements or object key/value pairs from the containing object". Backport of ba691933cee375195c9c50f333dd4b2a3abbb726 from master.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/3.1.txt5
-rw-r--r--docs/topics/db/queries.txt8
2 files changed, 8 insertions, 5 deletions
diff --git a/docs/releases/3.1.txt b/docs/releases/3.1.txt
index cd74eb81cb..22e47c93ae 100644
--- a/docs/releases/3.1.txt
+++ b/docs/releases/3.1.txt
@@ -533,7 +533,10 @@ backends.
``DatabaseFeatures.supports_json_field`` to ``False``. If storing primitives
is not supported, set ``DatabaseFeatures.supports_primitives_in_json_field``
to ``False``. If there is a true datatype for JSON, set
- ``DatabaseFeatures.has_native_json_field`` to ``True``.
+ ``DatabaseFeatures.has_native_json_field`` to ``True``. If
+ :lookup:`jsonfield.contains` and :lookup:`jsonfield.contained_by` are not
+ supported, set ``DatabaseFeatures.supports_json_field_contains`` to
+ ``False``.
* Third party database backends must implement introspection for ``JSONField``
or set ``can_introspect_json_field`` to ``False``.
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt
index 2528144d68..b3463cb4ce 100644
--- a/docs/topics/db/queries.txt
+++ b/docs/topics/db/queries.txt
@@ -960,9 +960,9 @@ contained in the top-level of the field. For example::
>>> Dog.objects.filter(data__contains={'breed': 'collie'})
<QuerySet [<Dog: Meg>]>
-.. admonition:: Oracle
+.. admonition:: Oracle and SQLite
- ``contains`` is not supported on Oracle.
+ ``contains`` is not supported on Oracle and SQLite.
.. fieldlookup:: jsonfield.contained_by
@@ -984,9 +984,9 @@ subset of those in the value passed. For example::
>>> Dog.objects.filter(data__contained_by={'breed': 'collie'})
<QuerySet [<Dog: Fred>]>
-.. admonition:: Oracle
+.. admonition:: Oracle and SQLite
- ``contained_by`` is not supported on Oracle.
+ ``contained_by`` is not supported on Oracle and SQLite.
.. fieldlookup:: jsonfield.has_key