Bulk get of child entities on Google app engine?

Posted by dfrankow on Stack Overflow See other posts from Stack Overflow or by dfrankow
Published on 2010-05-08T17:13:09Z Indexed on 2010/05/08 17:18 UTC
Read the original article Hit count: 269

Filed under:
|

On Google App Engine in Python, I have a Visit entity that has a parent of Patient. A Patient may have multiple visits.

I need to set the most_recent_visit (and some auxiliary visit data) somewhere for later querying, probably in another child entity that Brett Slatkin might call a "relationship index entity."

I wish to do so in a bulk style as follows:

1. get 100 Patient keys
2. get all Visits that have any of the Patients from 1 as an ancestor
3. go through the Visits and get the latest for each Patient

Is there any way to perform step 2 in a bulk get?

I know there is a way to bulk get entities from a list of keys, and there is a way to match a single entity by its ancestor.

© Stack Overflow or respective owner

Related posts about google-app-engine

Related posts about python