Enhancer (DataNucleus)

A responsibility of all ORMs is lazy loading of related objects (so as not to load all the data in one go), and tracking of objects as they are modified (to flush back to the database).

With JDO, this is accomplished by post-processing — or enhancing — the compiled bytecode.

This is typically performed using the datanucleus:enhance Maven plugin. This is defined as the causeway-app-starter-datanucleusenhance profile in the Parent POM, and is activated by the presence of the logging-dn-enhance.properties file.

App Starter Parent POM (pom.xml)
<profile>
  <id>causeway-app-starter-datanucleusenhance</id>
  <activation>
    <file>
	  <exists>${basedir}/logging-dn-enhance.properties</exists>
    </file>
  </activation>
  <build>
    <plugins>
      <plugin>
        <groupId>org.datanucleus</groupId>
        <artifactId>datanucleus-maven-plugin</artifactId>
        ..
      </plugin>
    </plugins>
  </build>
<profile>

Some IDEs (notably Eclipse) provide plugins to run the enhancer as part of their compile process. See setup guides for more details.