Hi,
I am trying to use ancestor filters, but it does not work as I expect it to.
I have a shop entity with an id generated by the datastore.
I have an order entity with an id I set myself, and the parent of the order
is the shop.
I have a transaction entity with an id I set myself, and the parent of the
transaction is the order.
Now I would like to get the transactions which has a given shop ancestor,
so I set the ancestor on the transaction query like this:
query.setAncestor(KeyFactory.createKey("shop", shop.getId()));
where shop.getId() is a string, i.e. the key name.
But when I execute the query I do not get any results.
Did I misunderstod how ancestor filters are to be used?
When I create orders I can see the parent is set to the shop as expected,
when I create transactions I can see the parent is set to the shop as
expected.
But when I have a transaction entity and call
transaction.getParent().getParent() I would expect to get the shop, but I
get null.
Thanks,
-Louise
--
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 https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/83ba356f-4954-4792-9435-eb350c42a57b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.