1

Eclipse JPA 图表编辑器是否可以从 JAR 中读取实体?

我已经使用包含目标实体的 JAR 配置了底层的 persistence.xml(见下文)。但是,编辑器似乎没有看到实体。

但是,当我链接到源文件时,编辑器工作正常。

带有 JAR 的 persistence.xml 如下:

<?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="com.saphir.modules.monitoring">
        <jar-file>module1.jar</jar-file>
        <jar-file>module2.jar</jar-file>
        <jar-file>module3.jar</jar-file>
        <jar-file>module4.jar</jar-file>
    </persistence-unit>
</persistence>
4

0 回答 0