Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
JPA 1.0
-
None
-
None
Description
JPA spec defines a schema for the entity mapping descriptor (aka orm.xml). We need to handle it. I see the following subtasks involved:
1. Create a class that is able to store all information defined in the schema (even if some fields currently have no analogues in Cayenne). This class does not depend on cayenne core, so it should be placed in "org.objectstyle.cayenne.jpa"
2. Create a loader from XML. Use Cayenne XMLDecoder if possible?
3. Create a converter between orm.xml descriptor class and DataMap.
Note: another way to load an ORM descriptor bean is by inspecting managed class annotations (CAY-456). Note that XML descriptor infor overrides annotations, so the loader should be able to work with an existing desctiptor, updating it from XML data.
A quote from spec:
"The XML descriptor is intended to serve as both analternative and an overriding mechanism
to the use of Java language metadata annotations."