You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<QuerySet [<Post: First post>, <Post: Second post>, <Post: Third post>]>
339
+
340
+
.. fieldlookup:: embeddedmodelarrayfield.len
341
+
342
+
``len``
343
+
^^^^^^^
344
+
345
+
Returns the length of the embedded model array. The lookups available afterward are those available for :class:`~django.db.models.IntegerField`. For example:
Returns objects where **any** embedded model in the array exactly matches the given value. This acts like an existence filter on matching embedded documents.
Note that this does **not** require the whole array to match, only that at least one embedded document matches exactly.
375
+
376
+
Keytransforms
377
+
^^^^^^^^^^^^^
378
+
379
+
Key transforms for \:class:`EmbeddedModelArrayField` allow querying fields of the embedded model. The transform checks if **any** element in the array has a field matching the condition, similar to MongoDB behavior. For example:
0 commit comments