I am trying to see some usage samples of JPA orm.xml. If some one direct me to a link,
2 Answers
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

- 17,965
- 11
- 91
- 146
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.

- 21
- 3
-
2As a friend of mine pointed out, with all the annotations now ending up on a model/domain object, sometimes using XML just increases sanity, so I think there are reasons you might want to use XML. – PlexQ Jan 30 '12 at 16:17
-
It also appears the link is broken. – PlexQ Jan 30 '12 at 16:17