Open thekie opened 8 years ago
Hello. I have found the following:
>>> from motorengine import Document,IntField >>> class Test(Document): ... foo = IntField(default=0) ... test = Test() >>> test.foo 0
Whereas
>>> from motorengine import Document,IntField >>> class Test(Document): ... foo = IntField(default=0, db_field="faa") ... test = Test() >>> test.foo None
Do you have an idea, what I am doing wrong? Or is it a bug, that the default value gets ignored in the later case?
Hello. I have found the following:
Whereas
Do you have an idea, what I am doing wrong? Or is it a bug, that the default value gets ignored in the later case?