2

http://code.google.com/p/objectify-appengine/downloads/listから Objectify 3.1 lib をダウンロードしました。ガイドに従うと、@Entity オブジェクトに @Id と @Index のアノテーションを付ける必要があるとのことです。しかし、それらはlibにはまったく含まれていません!

私の com.googlecode.objectify.annotation パッケージには、次の注釈のみが含まれています。

  • com.googlecode.objectify.annotation.AlsoLoad.class
  • com.googlecode.objectify.annotation.Cached.class
  • com.googlecode.objectify.annotation.Entity.class
  • com.googlecode.objectify.annotation.Indexed.class
  • com.googlecode.objectify.annotation.NotSaved.class
  • com.googlecode.objectify.annotation.Parent.class
  • com.googlecode.objectify.annotation.Serialized.class
  • com.googlecode.objectify.annotation.Subclass.class
  • com.googlecode.objectify.annotation.Unindexed.class

助けてください!ありがとう!

4

1 に答える 1

2

Objectify 3.1 は、独自のパッケージ内の Id アノテーションではなく、javax.persistence.Id を使用します。これの論理的根拠は、ライブラリ固有のものではなく、標準の注釈を使用する必要があるということだったと思います。いずれにせよ、Objectify 4 (多くの非常に優れた改善点があります) には、jar 内で定義された Id 注釈があります... あなたの質問は珍しいものではなかったので、私は疑っています。

于 2012-10-03T20:30:41.727 に答える