在Python的Google App Engine中,我有一個擁有Patient父級的Visit實體。病人可能有多次訪問。批量獲取Google應用引擎上的子實體?
我需要在某處設置most_recent_visit(以及一些輔助訪問數據)供以後查詢,可能在Brett Slatkin可能稱爲「關係索引實體」的另一個子實體中。
我希望在散裝風格這樣做如下:
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
有什麼辦法來執行步驟2在批量get?
我知道有一種方法可以從鍵列表中批量獲取實體,並且可以通過其祖先匹配單個實體。