What is the difference between EmbeddedDocumentField and ReferenceField in mongoengine

EmbeddedDocumentField is just path of parent document like DictField and stored in one record with parent document in mongo.

To save EmbeddedDocument just save parent document.

>>> some_author = User.objects.get(name="ExampleUserName")
>>> post = Post.objects.get(author=some_author)
>>> post.comments
[]
>>> comment = Comment(text="cool post", tag="django")
>>> post.comment.append(comment)
>>> post.save()

>>> post.comment
[<Comment object __unicode__>]

>>> Post.objects.get(author=some_author).comment
[<Comment object __unicode__>]

See documentation: http://docs.mongoengine.org/guide/defining-documents.html#embedded-documents.