diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-07-28 13:06:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-28 13:06:52 +0200 |
| commit | ba691933cee375195c9c50f333dd4b2a3abbb726 (patch) | |
| tree | fa800770d47600f66d9a5164861b06d1e114e36b /docs | |
| parent | 7dbbe65647a54283fadf2c51f11a750a74425d7b (diff) | |
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".
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/3.1.txt | 5 | ||||
| -rw-r--r-- | docs/topics/db/queries.txt | 8 |
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 793c0b48ad..a56f9bf078 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 |
