在 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 和时间表之间的外键