Hi,
I did 2 modification to our schema. Our schema looked like this:
class Entity - List<String> permissions class ServiceProvider extends Entity - String name class Airline extends Entity - String name - String iata
Now I changed the List<String> to List<Permission> (Permission is an embeddable class), the fields name remained untouched. After that I derived Airline from ServiceProvider and removed the duplicated name field, the schema now looks like this:
class Permission (@Embedded) class Entity - List<Permission> permissions class ServiceProvider extends Entity - String name class Airline extends ServiceProvider - String iata
No fields or classes were renamed or moved to different packages.
If I now want to read an Airline object I get the following exception:
Caused by: java.lang.ArrayIndexOutOfBoundsException: 9 at com.mvolution.domain.entities.misc.ServiceProvider.__odbWriteContent(ServiceProvider.java:1) ~[classes/:na] at com.mvolution.domain.entities.misc.Airline.__odbWriteContent(Airline.java:1) ~[classes/:na] at com.objectdb.o.MMM.aj(MMM.java:1147) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.o.UTY.aD(UTY.java:1337) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.o.UTY.aC(UTY.java:1326) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.o.ENH.a(ENH.java:46) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.o.STA.U(STA.java:532) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.o.STM.E(STM.java:433) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.o.OBM.bP(OBM.java:931) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.jdo.PMImpl.bP(PMImpl.java:2279) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.o.OBM.bO(OBM.java:842) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.o.OBM.bM(OBM.java:751) ~[objectdb-mvolution-2.6.9_05.jar:na] at com.objectdb.jpa.EMImpl.commit(EMImpl.java:287) ~[objectdb-mvolution-2.6.9_05.jar:na]
So it seems that both changes produce an unreadable database file. If I rename the permissions field to something else it works. The objectdb doctor states "No errors have been found". Is there any other way to resolve this schema update without renaming the permissions field?
Thanks for your help
Markus Ritter