Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot query and filter fields of subclasses of embedded documents #475

Closed
alonho opened this issue Sep 22, 2013 · 6 comments · Fixed by #2042
Closed

Cannot query and filter fields of subclasses of embedded documents #475

alonho opened this issue Sep 22, 2013 · 6 comments · Fixed by #2042
Assignees

Comments

@alonho
Copy link
Contributor

alonho commented Sep 22, 2013

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"'
@rozza
Copy link
Contributor

rozza commented Sep 27, 2013

Will fix in 0.9

@nicolasdespres
Copy link
Contributor

Any plan for 0.9 release?

@DavidBord
Copy link
Contributor

Person.objects(settings__foo='bar') exception already solved with #744

@MRigal MRigal modified the milestones: 0.10, 0.9, Scheduled, not planned May 6, 2015
@ikseek
Copy link

ikseek commented Mar 10, 2016

I can still reproduce it in 0.10.6.
#744 solves this problem for Document subclasses, not EmbeddedDocument subclasses.

@sebitoelcheater
Copy link

Any news?

@spitzbubchen
Copy link

Any updates? I'm also running into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants