Reputation: 141
Is there a way how to query all GAE Datastore entities that have a parent of a given kind? Each entity has a key that consists of a kind and id/name and we would like to query by that kind. Is this somehow possible to use that information in a query? Or do we have to store the kind in a separate property and then use that property in the query?
Upvotes: 1
Views: 235
Reputation: 24956
That's an interesting question. If you mean, given an Entity of kind A, where A's parent can be of kind B, C, ..., find all of the A's that have a parent of kind B, then I'm pretty sure that the answer is that this isn't doable in a single query, other than iterating across all As, examining their parent's kind. (If I discover otherwise, I'll revise this answer).
Given this problem, I'd store the parent kind as a separate (string) property.
Upvotes: 1