Search code examples
apache-cayenne

What is the status of JPA support in apache-cayenne?


I've found many JPA-related issues in cayenne's tracker with status 'closed'. But see nothing JPA-related in sources.
I'm interested in the status of JPA compatibility in cayenne.
What is done, what is on the way, what issues can I hit using that nonreleased code. And where is the sources of that work, branch name maybe.
What I want from it is JPA annotations. Maybe some cayenne's xml generator from JPA annotations or some kind of JPA-annotations-aware DataMapProvider that can handle annotated classes. Or maybe backward generator from xml to java sources.


Solution

  • In the past long gone Cayenne community was pursuing JPA compatibility (hence all those tasks in Jira). We no longer do. So ORM modeling in Cayenne is XML based as always. Annotations are often used for "secondary" metadata (like cache behavior, etc), but the main ORM model is XML.

    The mapping process is evolving in the direction of automated DB to ORM to Java code flow. In 4.0 (4.0.M2 is being voted on ATM) "cdbimport" Ant/Maven task is beefed up to make it practical.