I am using NeoDatis (DB4O is another similar Object DB) under DataNucleus.
I see a post on the NeoDatis forums on how to add a unique index on a class property (shown below):
ODB odb = open("baseName");
ClassRepresentation clazz = db.getClassRepresentation(IndexedObject.class);
String[] indexFields = { "name", "duration" };
clazz.addUniqueIndexOn("index1", indexFields, true);
How can I accomplish the same using DataNucleus now?
Do I need to implement this piece in a DB-specific way, or is there a way to make it generic in DataNucleus?
I have been told (on the DataNucleus forums) that this functionality will be added in version 3.x, in the prior 2.x releases it is not a supported feature and must be done using NeoDatis code directly.