Mention DynamicEmbeddedDocument in embedded section.

This commit is contained in:
Jan-Lucas Ott 2021-06-30 17:16:07 -04:00 committed by GitHub
parent 4670508a1c
commit bffe058726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,6 +27,8 @@ objects** as class attributes to the document class::
As BSON (the binary format for storing data in mongodb) is order dependent,
documents are serialized based on their field order.
.. _dynamic-document-schemas:
Dynamic document schemas
========================
One of the benefits of MongoDB is dynamic schemas for a collection, whilst data
@ -231,6 +233,9 @@ document class as the first argument::
comment2 = Comment(content='Nice article!')
page = Page(comments=[comment1, comment2])
Embedded documents can also leverage the flexibility of :ref:`dynamic-document-schemas:`
by inheriting :class:`~mongoengine.DynamicEmbeddedDocument`.
Dictionary Fields
-----------------
Often, an embedded document may be used instead of a dictionary generally