persistence@glassfish.java.net

Re: Resource names of the orm mappings

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Thu, 17 Jul 2008 09:08:29 -0400

Yes there is a convention. By default any file named "orm.xml" in the
META-INF directory of the Persistence Unit or in a jar referenced from
the Persistence Unit will be read by default for entity mappings. A
single JPA mapping file can contain all of the Entity Mappings for a
Persistence Unit or may only contain part of the mappings.
Other than this there is no file naming convention.
--Gordon

Aleksei Valikov wrote:
> Hi,
>
> imagine ORM mappings are defined in XML resource files and not as
> annotations. Is there any convention about names of such resources?
> For instance, in Hibernate there's a usual MyClass.hbm.xml convention.
> Is there anything like this for JPA? Like, MyClass.orm.xml or
> MyClass.jpa.xml?
>
> Bye.
> /lexi
>