Enhancing core library extension classes
Enhancing core library extension classes
If you are customizing the Elastic Path core library, you may need to add and/or modify domain classes. The domain classes in your core library extension need to be bytecode-enhanced for persistence through OpenJPA, the same as domain classes in the base core library.
Normally, these classes will be enhanced by Maven automatically with the mvn package or mvn install command. However, if you are importing a Core extension in Eclipse, you must enable OpenJPA enhancement.
To enable OpenJPA in your Core extension project:
- Right-click your core extension project and select Properties.
- Click OpenJPA
- Select Enable OpenJPA Enhancer
- Under configuration information, enter the following XML file:
src\main\resources\META-INF\jpa-persistence.xml
- Beside OpenJPA Enhancer Version, select 1.2.1 (EP Customized)Note:Your screen should look like the image below:
The box beside OpenJPA Enhancer Version may be grayed out. This is fine as you may still click it and select 1.2.1 (EP Customized).
- Click OK to apply your changes.