The metamodel module extends the metamodel built up by Naked Objects to include JPA semantics.
This is done for two reasons:
An example of this is the optionality of a property, which can be derived from the JPA @Basic annotation instead of Naked Objects' @Optional annotation
An example of this is the JPA @Id annotation that is used by JPA Objects to build internal object identifiers (OIDs).
The metamodel module provides implementations of several of Naked Objects' APIs, including:
For example, JPA Objects checks that a domain object annotated as @Entity is not also annotated as @Embedded
When using JPA Objects we configure Naked Objects to use this extended metamodel using the property:
+----------------------------------------------------------------------------------------+ nakedobjects.reflector=org.starobjects.jpa.metamodel.specloader.JpaJavaReflectorInstaller +----------------------------------------------------------------------------------------+
This is typically done by adding the property in nakedobjects.properties file. See the user guide for more details.