2

我定义了一些实体,现在想生成表格。

我使用 Eclipselink 2.5 (JPA 2.1) 和 Glassfish 4.0,我的程序使用 JKD7。

当我构建应用程序时,有以下消息:

warning: Supported source version 'RELEASE_6' from annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' less than -source '1.7'

Note: Creating static metadata factory ...
Note: Optional file was not found: META-INF/orm.xml continuing with generation.
Note: Optional file was not found: META-INF/eclipselink-orm.xml continuing with generation.
Note: Optional file was not found: META-INF/orm.xml continuing with generation.
Note: Optional file was not found: META-INF/eclipselink-orm.xml continuing with generation.

我不知道我现在需要做什么...

  • 我有最新的 EclipseLink 版本
  • 最新版本的玻璃鱼
  • jkd 7
  • 只是标准的 derby 数据库(随 glassfish 4.0 一起提供)

我该如何解决这个问题?

编辑1:

<properties>
  <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
  <property name="eclipselink.ddl-generation.output-mode" value="database"/>
</properties>
4

2 回答 2

0

我有同样的问题,在这里找到了解决方案。在 netbeans 上更改此设置:
[RUN>SET PROJECT CONFIGURATION>Customize>Build>Compiling> Disable Annotation Processing]

于 2021-02-21T21:42:07.220 回答
0

只需将这些行放在persistance.xml 中:

<property name="eclipselink.ddl-generation" value="create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
<property name="eclipselink.ddl-generation-mode" value="ddl_database_generation" />
于 2016-01-25T13:13:02.833 回答