Hi,
After investigation it turns out that opening a standard EntityManager while the entity classes are not in the class path allows objectdb to retrieve the data model as it is in the database file rather than the Class hierarchy.
With this in mind, I created a separate project where I opened an EntityManager on a copy of the database file. I can now use a standard getMetamodel() method on the EntityManager to get the database model as it is in the database file.
Now, I need the new Class hierarchy to compare with. To do so, I create a new URLClassLoader with a URL pointing to the folder containing my Class hierarchy like so:
URLClassLoader classLoader = new URLClassLoader(urlToTheFolderContaingMyEntityClasses, MyCurrentClass.this.getClass().getClassLoader());
Now that I have the Meta Model from the database and the Class hierarchy, I just need to compare each class from the Meta Model with the same class form the Class Hierarchy by loading the class with the new ClassLoader like so:
Class<?> claz = classLoader.loadClass(myClassName);
I hope this helps. If you need more information, let me know.
Thanks,
Farid