Tested on 0.8.4.
from mongoengine import *
connect('test')
class BaseSettings(EmbeddedDocument):
meta = {'allow_inheritance': True}
class AdminSettings(BaseSettings):
foo = StringField()
class Person(Document):
settings = EmbeddedDocumentField(BaseSettings)
Person.objects(settings__foo='bar') # raises 'Cannot resolve field "foo"'
Person.objects.only('settings.foo') # raises 'Cannot resolve field "foo"'
Will fix in 0.9
Any plan for 0.9 release?
Person.objects(settings__foo='bar') exception already solved with #744
I can still reproduce it in 0.10.6.
Document subclasses, not EmbeddedDocument subclasses.Any news?
Any updates? I'm also running into this issue.
Most helpful comment
I can still reproduce it in 0.10.6.
744 solves this problem for
Documentsubclasses, notEmbeddedDocumentsubclasses.