I am encountering problems (complexities) with EntityManager registration of entities across multiple modules in a multi-module Maven project. I have a entities under many different paths in many different modules, and frequently evolving/changing.
JPA2 persistence.xml does not seem to have support for wildcards under the <class> field.
Apparently Hibernate has an autodetection extension system: hibernate.archive.autodetection
Example extension usage in persistence.xml:
<properties> <!-- Scan for annotated classes and Hibernate mapping XML files --> <property name="hibernate.archive.autodetection" value="class, hbm"/> <property name="hibernate.hbm2ddl.auto" value="validate" /> <property name="hibernate.show_sql" value="true" /> </properties>
Q1: Would it be possible to introduce such an entity-scanning extension feature in ObjectDB ?
Q2: Does it make any difference to the EntityManager whether one performs compile-time enhancement or runtime enhancement ?
That is, does the enhancement have any effect on entities known to: