开发者

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:

  1. use the annotated classes to generate the database schema
  2. use OpenJPA's SchemaTool to reverse engineer the database schema into their XML schema file
  3. use OpenJPA's ReverseMappingTool to generate XML mapping files from the XML schema file
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜