So basically I have these documents
class Tag(Document):
name = StringField()
...
class Doc(Doument):
nameTag = ReferenceField(Tag)
tags = ListField(ReferenceField(Tag))
And I want to query for nameTags with specific names. So I thought the question was answered here How to perform such filter queries in mongoengine on nested dicts or arrays contained in dict with python?
But when I try the query:
name="Hello"
docs1 = Doc.objects(nameTag__name=name)
docs2 = Doc.objects(tags__name=name)
I get the error
Cannot perform join in mongoDB: nameTag__name