Matt Norris
Matt Norris

Reputation: 8836

Is there a "children" method in App Engine?

When entities with a parent are created, they can always reference this parent by calling the parent() method in Python.

Does the parent have a corresponding children() method? I didn't see one in the docs. If not, is there an equivalent query?

Upvotes: 1

Views: 148

Answers (1)

Robert Kluin
Robert Kluin

Reputation: 8292

Yes, you can query for objects with a given ancestor. Check out the ancestor() method on the query object, or ANCESTOR IS if you prefer GQL.

Upvotes: 2

Related Questions