Mappings from JPA-mapping-files are considered
[hibernate4-maven-plugin] / src / it / multiple-persistence-units / src / main / resources / META-INF / persistence.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <persistence
3     xmlns="http://java.sun.com/xml/ns/persistence"
4     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5     version="1.0">
6
7   <!-- taken from https://dzone.com/articles/persisting-entity-classes -->
8   <persistence-unit name="A">
9     <class>a.Employee</class>
10     <exclude-unlisted-classes>true</exclude-unlisted-classes>
11     <properties>
12       <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
13     </properties>
14   </persistence-unit>
15
16   <!-- taken from http://webdev.jhuep.com/~jcs/legacy-ejava-javaee/coursedocs/605-784-site/docs/content/html/hibernate-migration-orm.html -->
17   <persistence-unit name="B">
18     <mapping-file>META-INF/sale.xml</mapping-file>
19     <mapping-file>META-INF/person.xml</mapping-file>
20     <mapping-file>META-INF/clerk.xml</mapping-file>
21     <mapping-file>META-INF/customer.xml</mapping-file>
22     <exclude-unlisted-classes>true</exclude-unlisted-classes>
23     <properties>
24       <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL9Dialect"/>
25     </properties>
26   </persistence-unit>
27
28 </persistence>