5.  Mapping Factory

An important decision in the object-relational mapping process is how and where to store the data necessary to map your persistent classes to the database schema.

Section 1, “ Metadata Factory ” introduced OpenJPA's MetaDataFactory interface. OpenJPA uses this same interface to abstract the storage and retrieval of mapping information. OpenJPA includes the built-in mapping factories below, and you can create your own factory if you have custom needs. You control which mapping factory OpenJPA uses with the openjpa.jdbc.MappingFactory configuration property.

The bundled mapping factories are:

Example 7.13.  Standard JPA Configuration

In the standard JPA configuration, the mapping factory is left unset.

<property name="openjpa.MetaDataFactory" value="jpa"/>