@@ -35,8 +35,9 @@ Some MongoDB-specific fields are available in ``django_mongodb_backend.fields``.
35
35
:class: `~django.db.models.OneToOneField ` and
36
36
:class: `~django.db.models.ManyToManyField `) and file fields (
37
37
:class: `~django.db.models.FileField ` and
38
- :class: `~django.db.models.ImageField `). :class: `EmbeddedModelField ` is
39
- also not (yet) supported.
38
+ :class: `~django.db.models.ImageField `).
39
+
40
+ For :class: `EmbeddedModelField `, use :class: `EmbeddedModelArrayField `.
40
41
41
42
It is possible to nest array fields - you can specify an instance of
42
43
``ArrayField `` as the ``base_field ``. For example::
@@ -178,7 +179,7 @@ Index transforms
178
179
Index transforms index into the array. Any non-negative integer can be used.
179
180
There are no errors if it exceeds the :attr: `max_size <ArrayField.max_size> ` of
180
181
the array. The lookups available after the transform are those from the
181
- :attr: `base_field < ArrayField.base_field> `. For example:
182
+ :attr: `~ ArrayField.base_field `. For example:
182
183
183
184
.. code-block :: pycon
184
185
@@ -268,6 +269,20 @@ See :doc:`/topics/embedded-models` for more details and examples.
268
269
created these models and then added an indexed field to ``Address ``,
269
270
the index created in the nested ``Book `` embed is not created.
270
271
272
+ ``EmbeddedModelArrayField ``
273
+ ---------------------------
274
+
275
+ .. class :: EmbeddedModelArrayField(embedded_model, **kwargs)
276
+
277
+ .. versionadded :: 5.2.0b1
278
+
279
+ Stores a list of models of type ``embedded_model ``.
280
+
281
+ .. attribute :: embedded_model
282
+
283
+ This is a required argument, similar to
284
+ :attr: `EmbeddedModelField.embedded_model `.
285
+
271
286
``ObjectIdAutoField ``
272
287
---------------------
273
288
0 commit comments