Hello there !
I recently enjoying myself on Google App Engine by building a geoloc app.
However I'm struggling with an issue querying referenced property :
I have two classes, let's say class A and class B. Class A contains a
referenced property on class B.
What I want to do is to get a list of class A objects filtering on class B
collection.
For example, I have severals class B objects, I want to get all class A
objects which referenced one of the class B collection.
Here's what I managed to do :
classB_keys = []
for obj in classB_collection:
classB_keys.append(obj.key().id())
q = classA.all()
q.filter("classB.__key__ IN ", classB_keys)
results = q.fetch(limit=None, offset=0).get()
My point is that my classB_keys is not empty but my results is. And when I
look into the datastore I have a classA which reference one of the classB
in the collection.
Can I have any help ?
Thanks you !
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.