class Doc(BaseDocument): num = fields.IntField() string = fields.StringField() lst = fields.ListField(fields.IntField()) map1 = fields.MapField(fields.IntField()) map2 = fields.MapField(fields.StringField())
class EmbedDoc(BaseDocument): ref = fields.ListField(fields.MapField(fields.DocumentField(Outer)))
class Inner(BaseDocument): m = fields.MapField(fields.IntField())
class EmbedDoc(BaseDocument): ref_map = fields.MapField(fields.DocumentField(IntDoc))
class MapDoc(BaseDocument): mapping = fields.MapField(fields.IntField())
class MapDoc(BaseDocument): mapping = fields.MapField(fields.IntField(required=True), default={'x': 5})