Skip to content

Commit 3b10236

Browse files
authored
Merge pull request #2536 from ottj3/patch-1
Mention DynamicEmbeddedDocument in usage docs.
2 parents 4670508 + bffe058 commit 3b10236

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

docs/guide/defining-documents.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ objects** as class attributes to the document class::
2727
As BSON (the binary format for storing data in mongodb) is order dependent,
2828
documents are serialized based on their field order.
2929

30+
.. _dynamic-document-schemas:
31+
3032
Dynamic document schemas
3133
========================
3234
One of the benefits of MongoDB is dynamic schemas for a collection, whilst data
@@ -231,6 +233,9 @@ document class as the first argument::
231233
comment2 = Comment(content='Nice article!')
232234
page = Page(comments=[comment1, comment2])
233235

236+
Embedded documents can also leverage the flexibility of :ref:`dynamic-document-schemas:`
237+
by inheriting :class:`~mongoengine.DynamicEmbeddedDocument`.
238+
234239
Dictionary Fields
235240
-----------------
236241
Often, an embedded document may be used instead of a dictionary – generally

0 commit comments

Comments
 (0)