@Unique doesn't have any effect in DataNucleus w/ NeoDatis
- by David Parks
Using JDO / DataNucleus / NeoDatis datastore
I added @Unique to a field of a persistable object, however I am allowed to create multiple objects which violate the unique constraint. The docs for DataNucleus/NeoDatis suggest that Unique fields are supported.
@PersistenceCapable
public class User {
@Persistent
@Unique
private String username;
//...
}
If I add multiple objects to the DB with the same username there's no problem doing so. :(