ID で永続化されたオブジェクトを取得することに行き詰まっています。エラーが発生します:
com.google.appengine.api.datastore.EntityNotFoundException: No entity was found matching the key: CNG("T78")
以下のようにオブジェクトをデータ ストアに永続化します。
Key cngKey = KeyFactory.createKey("CNG", jsonCNG.cNGID);
Entity cngEntity = new Entity("CNG", cngKey);
cngEntity.setProperty("cng_name", jsonCNG.cNGName);
cngEntity.setProperty("cng_type", jsonCNG.cNGType);
cngEntity.setProperty("cng_content", cng);
ここで cng は json 文字列です。文字列でキーを設定します: cNGID. オブジェクトを取得するために同じIDを使用しようとしています。
Key cngKey = KeyFactory.createKey("CNG", "T78")
上記のエラーが発生します。