Hi!
I have the following persistence.xml. The problem is that ObjectDB loads all the classes in P1 (+ their embeddable classes). P2 is created properly, but P1 gets all entity classes (from P2 also). How can this be avoided, so that both P1 and P2 get just the classes that were specified to each?
There is no place in code where P1 tries to access classes from P2, so it makes no sense.
<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" 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"> <persistence-unit name="P1" transaction-type="JTA"> <provider>com.objectdb.jpa.Provider</provider> <class>com.pingushare.entity.p1.Item</class> <class>com.pingushare.entity.p1.Login</class> <class>com.pingushare.entity.p1.Trade</class> <class>com.pingushare.entity.p1.TradeRequest</class> <class>com.pingushare.entity.p1.User</class> <class>com.pingushare.entity.p1.Wish</class> <shared-cache-mode>NONE</shared-cache-mode> <validation-mode>NONE</validation-mode> <properties> <property name="javax.persistence.jdbc.url" value="objectdb://localhost/xxx/p1.odb"/> <property name="javax.persistence.jdbc.user" value="xxx"/> <property name="javax.persistence.jdbc.password" value="xxx"/> </properties> </persistence-unit> <persistence-unit name="P2" transaction-type="JTA"> <provider>com.objectdb.jpa.Provider</provider> <class>com.pingushare.entity.p2.Email</class> <class>com.pingushare.entity.p2.EmailActivation</class> <class>com.pingushare.entity.p2.PasswordReset</class> <shared-cache-mode>NONE</shared-cache-mode> <validation-mode>NONE</validation-mode> <properties> <property name="javax.persistence.jdbc.url" value="objectdb://localhost/xxx/p2.odb"/> <property name="javax.persistence.jdbc.user" value="xxx"/> <property name="javax.persistence.jdbc.password" value="xxx"/> </properties> </persistence-unit> </persistence>
Thanks.