Where can i find jpa orm.xml usage samples [closed]

微笑、不失礼 提交于 2019-12-23 07:42:02

问题


I am trying to see some usage samples of JPA orm.xml. If some one direct me to a link,


回答1:


The schema is here,

http://java.sun.com/xml/ns/persistence/orm_2_0.xsd

There are lots of samples of each mapping type here,

http://en.wikibooks.org/wiki/Java_Persistence

Lots of examples here, http://wiki.eclipse.org/EclipseLink/Examples/JPA

In particular, http://wiki.eclipse.org/EclipseLink/Examples/JPA/EmployeeXML




回答2:


This may not be a complete answer but, http://www.jpox.org/docs/1_2/tutorials/jpa_tutorial.html uses JPA 1.0. However, it was of use when I created my ORM.xml for JPA 2.0. I know "Enterprise JavaBeans 3.0" from O'Reilly has good examples too. Otherwise you have to look at the schema (would post the link but apparently I don't have enough rep to post multiple links) and match it up with annotations examples...at least that is what I had to do.

ORM.xml appears to be falling out of favor for the annotation version, which explains the difficulty of finding any good examples of ORM.xml file.



来源:https://stackoverflow.com/questions/4596380/where-can-i-find-jpa-orm-xml-usage-samples

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!