Objectifyv4を使用してAppEngineでエンティティをフェッチしようとしていますが、機能しません。
- 私の@Entity:Translation.class
- フェッチしたい@Entityの@Id:301L
私の@Entity:
@Entity
public class Translation {
@Id
private Long id;
private String text;
public String getText() {
return text;
}
public Long getId() {
return id;
}
public void setText(String text) {
this.text = text;
}
}
言葉ではないリクエスト:
Translation translation =ObjectifyService.ofy().load().type(Translation.class).id(301L).get(); // translation is null
しかし、私がそうする場合:
Translation translation = ObjectifyService.ofy().load().type(Translation.class).first().get(); // translation is not null
それで:
System.out.println(translation.getId()); // translation id equal 301
したがって、idによるフェッチは機能していないようです。問題はどこだ?