Skip to content

Store type of embedded model to automatically find it's class when mapping. #5

@xonatius

Description

@xonatius
class A(Model):
    pass

class B(Model):
   a = Field()

b = B()
b.a = A()
collection.save(b)
b = collection.find_one(as_class=B)
# Should print A
print type(b.a)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions