You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class DataItem(EmbeddedDocument):
key = StringField(required=True)
value = StringField(required=True)
class MyDoc(Document):
data = MapField(
field=EmbeddedDocumentField(DataItem)
)
The query MyDoc.objects(data__a__value="test").first() succeeds while the query MyDoc.objects(data__key__value="test").first() fails with mongoengine.errors.InvalidQueryError: Cannot resolve field "value"
The text was updated successfully, but these errors were encountered:
Here is the class hierarchy:
And the data in db:
The query
MyDoc.objects(data__a__value="test").first()
succeeds while the queryMyDoc.objects(data__key__value="test").first()
fails with mongoengine.errors.InvalidQueryError: Cannot resolve field "value"The text was updated successfully, but these errors were encountered: