hi,
i just wrote an email to users@openjpa but there doesn't seem to be much activity there. do you know how to declare multiple persistence units?  i created 2 persistence units inside persistence.xml but it seems to create the entities from the second PU in the database of the first one.  my persistence.xml is like this.  the operator tables get created inside the file database
<?xml version="1.0" encoding="UTF-8"?>
<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="file">
        <jta-data-source>file</jta-data-source>
        <class>uk.me.kissy.file.entities.jpa.Box</class>
<class>uk.me.kissy.file.entities.jpa.Category</class>
<class>uk.me.kissy.file.entities.jpa.CqsReview</class>
<class>uk.me.kissy.file.entities.jpa.Department</class>
<class>uk.me.kissy.file.entities.jpa.Enclosure</class>
<class>uk.me.kissy.file.entities.jpa.Event</class>
<class>uk.me.kissy.file.entities.jpa.EventData</class>
<class>uk.me.kissy.file.entities.jpa.EventType</class>
        <!-- <class>uk.me.kissy.file.entities.jpa.File</class> -->
        <class>uk.me.kissy.file.entities.jpa.Log</class>
<class>uk.me.kissy.file.entities.jpa.Note</class>
<class>uk.me.kissy.file.entities.jpa.Payment</class>
<class>uk.me.kissy.file.entities.jpa.Price</class>
<class>uk.me.kissy.file.entities.jpa.Undertaking</class>
<class>uk.me.kissy.file.entities.jpa.UndertakingType</class>
<class>uk.me.kissy.file.entities.jpa.Workflow</class>
        <properties>
            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
        </properties>
    </persistence-unit>
    <persistence-unit name="operator">
        <jta-data-source>operator</jta-data-source>
<class>uk.me.kissy.file.entities.jpa.operator.Address</class>
<class>uk.me.kissy.file.entities.jpa.operator.Client</class>
<class>uk.me.kissy.file.entities.jpa.operator.Council</class>
<class>uk.me.kissy.file.entities.jpa.operator.Operator</class>
<class>uk.me.kissy.file.entities.jpa.operator.Posttown</class>
<class>uk.me.kissy.file.entities.jpa.operator.Wtr_auth</class>
    </persistence-unit>
</persistence>

Reply via email to