Matthew Broadhead
2018-10-22 17:14:35 UTC
eclipse IDE is complaining if i have multiple persistence units and they
contain classes with the same name. e.g.
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="db1">
<jta-data-source>db1</jta-data-source>
<non-jta-data-source>db1Unmanaged</non-jta-data-source>
<class>com.test.entities.jpa.db1.Test</class>
<properties>
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)" />
</properties>
</persistence-unit>
<persistence-unit name="db2">
<jta-data-source>db2</jta-data-source>
<non-jta-data-source>db2Unmanaged</non-jta-data-source>
<class>com.test.entities.jpa.db2.Test</class>
<properties>
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)" />
</properties>
</persistence-unit>
</persistence>
is eclipse right or can i ignore the error?
contain classes with the same name. e.g.
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="db1">
<jta-data-source>db1</jta-data-source>
<non-jta-data-source>db1Unmanaged</non-jta-data-source>
<class>com.test.entities.jpa.db1.Test</class>
<properties>
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)" />
</properties>
</persistence-unit>
<persistence-unit name="db2">
<jta-data-source>db2</jta-data-source>
<non-jta-data-source>db2Unmanaged</non-jta-data-source>
<class>com.test.entities.jpa.db2.Test</class>
<properties>
<property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)" />
</properties>
</persistence-unit>
</persistence>
is eclipse right or can i ignore the error?