class Doc(Document): __collection__ = 'testdoc' e = fields.SimpleEmbeddedDocumentField({ 'i': fields.IntegerField(), 's': fields.StringField(default='default value'), })
class Doc(Document): __collection__ = 'testdocs' i = fields.IntegerField() s = fields.StringField() e = fields.EmbeddedDocumentField(EDoc) extra_class_value = 'value'
class EDoc(EmbeddedDocument): i = fields.IntegerField() s = fields.StringField()
class Doc(Document): __collection__ = 'testdocs' i = fields.IntegerField() s = fields.StringField()
class Doc(Document): __collection__ = 'testdocs' b = fields.BooleanField() i = fields.IntegerField() l = fields.ListField(fields.IntegerField())
class Doc(Document): __collection__ = 'testdoc' li = fields.ListField(fields.IntegerField())
class Doc(Document): __collection__ = 'testdoc' s = fields.SetField(fields.IntegerField())
class ETD(EmbeddedDocument): i = fields.IntegerField()
class Doc(Document): __collection__ = 'testdocs' i = fields.IntegerField() ref = fields.ReferenceField(DocRef)
class Doc(Document): __collection__ = 'docs' i = fields.IntegerField()
class Doc(Document): i = fields.IntegerField(smart_null=True) s = fields.StringField()
class DocNotObjectIdRef(Document): __collection__ = 'testdocs_ref' _id = fields.IntegerField()
class Doc(Document): __collection__ = 'testdoc' map = fields.MapField(fields.IntegerField())
class RefDoc(Document): __collection__ = 'refs' i = fields.IntegerField()
class DocCustom(Document): __collection__ = 'testdoc' map = fields.MapCustomKeysField(fields.IntegerField(), ObjectId)
class Doc(Document): __collection__ = 'testdocs' i = fields.IntegerField() b = fields.BooleanField()
class RDoc(Document): __collection__ = 'testrdocs' i = fields.IntegerField()
class EDocOne(EmbeddedDocument): type = fields.StringField(default='one') i = fields.IntegerField()
class DocRef(Document): __collection__ = 'testdocs_ref' i = fields.IntegerField()
class Doc(Document): __collection__ = 'testdoc' li = fields.ListField(fields.IntegerField(), auto_create=False)
class EDoc(EmbeddedDocument): id = fields.ObjectIdField(default_gen=True) i = fields.IntegerField() s = fields.StringField(default='default') e = fields.EmbeddedDocumentField('self')
class TestEDoc(EmbeddedDocument): i = fields.IntegerField()