According to this, Google App Engine's JDO implementation does not support JDO @Unique annotation. Is this still so?
For example, I have this class:
@PersistenceCapable
public class User {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private String email;
@Persistent
private String sessionToken;
...
}
Obviously the key
is unique, but I also wanted to have unique email
and sessionToken
. If @Unique is not supported, what's the best way to "simulate" this behaviour in terms of both simplicity and performance?