私は自分のマシンで「データストア」を試していました。このコードを使用します。
Key parentKey = KeyFactory.createKey("parent", "parentId");
try {
// Entity parent = new Entity("parent", "parentId");
// parent.setUnindexedProperty("property1", "value1");
// ds.put(parent);
Entity savedParent = ds.get(parentKey);
// savedParent.setUnindexedProperty("property1", "value3");
// ds.put(savedParent);
// Entity child = new Entity("child", "childId", savedParent.getKey());
Entity child = ds.get(KeyFactory.createKey(savedParent.getKey(), "child", "childId"));
child.setUnindexedProperty("property1", "val2");
ds.put(child);
// logger.info("Saved child.");
} catch (EntityNotFoundException e) {
throw new RuntimeException(e);
}
最初に親エンティティを保存し、そのプロパティを「value2」に設定してから、プロパティ val1 を持つ子エンティティを追加しました。次に、親プロパティを value3 に更新しました。次に、子のプロパティを val2 に更新しました。次に、管理コンソールで、親のプロパティの値が value2 に戻っていることがわかりました。もう一度繰り返しましたが、同じ結果でした。何か不足していますか?それともこれは何かのバグですか?