I have specified mongoengine
model class with _id
field as a StringField
:
class Store(DynamicDocument):
_id = StringField(primary_key=True, min_length=1)
And now when I query document by _id
field I get document properly:
I can get it by pk
too:
but I cannot get it by id
:
As you can see at the first screen there's id
and pk
fields initialized successfully. So I just can't make it out why mongoengine
behaves like this. What am I doing wrong?