Google App Engineで低レベルのAPIを使用していて、特定の親エンティティのすべての子エンティティを取得したい場合:Google App Engine(低レベルAPI)内のすべての子エンティティを取得するには
次のグラフを考える:
:私はここでは、次の[Child A (2), Child B (3), Child A (4)]
のようなリストが私の最高の試みでありたい
Parent (1)
|
+ --- Child A (2)
| |
| + --- Child B (3)
|
+ --- Child A (4)
を
Entity pe = new Entity("parent");
Entity c1 = new Entity("childA", pe.getKey());
Entity c2 = new Entity("childB", c1.getKey());
Entity c3 = new Entity("childA", pe.getKey());
// storage code left out for brevity
Key parentKey = KeyFactory.createKey(null, "parent", 1);
// According to documentation this should work (but does not)
PreparedQuery q = datastore.prepare(new Query(parentKey));
これは既知のバグですか?バグトラッカーにリンクがありますか? –
この問題のバグ修正を見つけられましたか?私もGAEで何かを開発しており、数秒ごとに更新プログラムを実行していたからです! – plutonium1991