So I need to reference particular subdocuments uniquely from items in my collection. For instance:
User = { \'name\': \'jim\', \'documents: [ {\
With mongoengine create a ObjectId in an embedded document like this:
from bson.objectid import ObjectId class Address(EmbeddedDocument): _id = ObjectIdField( required=True, default=lambda: ObjectId() ) street = StringField()