How to generate ORM.XML mapping files from annotations?
At work, we design solutions for rather big entities in the financi开发者_如何学运维al services area, and we prefer to have our deployment mappings in XML, since it's easy to change without having to recompile.
We would like to do our development using annotations and generate from them the orm.xml
mapping files. I found this proof of concept annotation processor, and something like that is what I'm looking for, but something that has support for most JPA annotations.
We're using WebSphere for development so we would prefer something that considers the OpenJPA implementation
Here is a possible approach:
- use the annotated classes to generate the database schema
- use OpenJPA's
SchemaTool
to reverse engineer the database schema into their XML schema file - use OpenJPA's
ReverseMappingTool
to generate XML mapping files from the XML schema file
精彩评论