When i try to store an object that has an enum member type, neodatis throws an exception. I believe this works ok in 1.9 latest, but not in 2.2 latest. Use the following code to reproduce error:
import org.neodatis.odb.NeoDatis;
import org.neodatis.odb.ODB;
import org.neodatis.odb.Objects;
public class EnumTest {
public enum Color {BLUE, RED, GREEN};
public static final String FILENAME = "test.db";
public class Car {
Color _model = Color.RED;
}
public static void main(String[] args)
{
new File(FILENAME).delete();
EnumTest test = new EnumTest();
ODB odb = NeoDatis.open(FILENAME);
odb.store(test.new Car());
odb.close();
ODB odb2 = NeoDatis.open(FILENAME);
Objects<Car> cars = odb2.query(Car.class).objects();
for (Car c : cars)
{
System.out.println(c.toString());
}
}
}