Attila O.
Attila O.

Reputation: 16625

Batching datastore ancestor-queries

Let's say I have:

class ParentKind(db.Model):
    """These are the parents."""

class ChildKind(db.Model):
    """Children. Their parents are ParentKind objects."""

I then create different parent objects, parent_1 and parent_2. How can I query 5 children op parent_1 and 10 children of parent_2 in one query? (e.g. an or-ancestor-query.)

Upvotes: 0

Views: 116

Answers (1)

Drew Sears
Drew Sears

Reputation: 12838

You can't. You'd have to run this as 2 queries and merge the results locally.

Upvotes: 3

Related Questions