I downloaded the Objectify 3.1 lib from http://code.google.com/p/objectify-appengine/downloads/list, and when I follow the guides, they say I should annotate my @Entity objects with @Id and @Index, but those aren’t included in the lib at all!
My com.googlecode.objectify.annotation package only includes these annotations:
- 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
Please help! Thanks!
Objectify 3.1 uses javax.persistence.Id, rather than an Id annotation inside its own package. I believe that the rationale for this was that one should use a standard annotation rather than something library-specific. In any case, Objectify 4 (which has many very nice improvements) has the Id annotation defined inside the jar… I suspect because your question was not unusual.