【发布时间】:2015-08-13 14:27:51
【问题描述】:
我是 Datastore 的新手,现在我正在使用 Datastore 和 Objectify 开发 Gae 应用程序。实体类的形式
@Entity
public class MyClass1 {
public Key<MyClass2> field1;
@Id Long id;
and so on
}
MyClass2 的格式为
@Entity
public class MyClass2 {
....
@Id public Long id;
@Index public String field2;
....
}
我有 MyClass1 的实体。如何获得 field2 的值? 如果我使用 DatastoreService1.get(myclass1.field1) 我得到 p>
method get(Key) in the DatstoreService is not applicable for arguments (Key<MyClass2>)
请帮帮我
【问题讨论】:
标签: google-app-engine google-cloud-datastore objectify