MongoEngine: EmbeddedDocument v/s. ReferenceField

后端 未结 2 651
栀梦
栀梦 2020-12-06 23:42

EmbeddedDocument will allow to store a document inside another document, while RefereneField just stores it\'s reference. But, they\'re achieving a

2条回答
  •  长情又很酷
    2020-12-07 00:13

    It's really about the schema design of your collections in MongoDB. Generally it depends on different factors like cardinality of the relationship, way of accessing the data or size of the documents. It's explained well in official MongoDB's blog with some examples and I recommend you take a look at it.

提交回复
热议问题