在两个持久性单元之间连接表

时间:2013-09-02 09:08:37

标签: jpa

在2个持久性单元之间加入2个表

 <persistence-unit name="oltpJPA">
<class>entity.timetable</class>
        <class>entity.facultyleave</class> 
        <properties>
            <property name="openjpa.jdbc.Schema" value="OLTP" />
            <property name="openjpa.ConnectionDriverName"value="com.ibm.db2.jcc.DB2Driver"/>
            <property name="openjpa.ConnectionURL" value="jdbc:db2://172.16.1.7:50000/OLTPDB:retrieveMessagesFromServerOnGetMessage=true;"/>
            <property name="openjpa.ConnectionUserName" value="administrator"/>
            <property name="openjpa.ConnectionPassword" value="server"/>
        </properties>


    </persistence-unit>

<persistence-unit name="oltpJPAabs">

    <class>property.Properties</class>

        <class>entity.StudentAbsenteseDate</class>
        <class>entity.StudentAbsenteseLecture</class>
    <properties>
            <property name="openjpa.jdbc.Schema" value="OLTP" />
            <property name="openjpa.ConnectionDriverName" value="com.ibm.db2.jcc.DB2Driver"/>
            <property name="openjpa.ConnectionURL" value="jdbc:db2://172.16.1.9:50000/OLTPDB:retrieveMessagesFromServerOnGetMessage=true;"/>
            <property name="openjpa.ConnectionUserName" value="administrator"/>
            <property name="openjpa.ConnectionPassword" value="lenovo"/>
        </properties>
    </persistence-unit></persistence>

无法管理 studentabsenteselecture和时间表之间的外键

0 个答案:

没有答案