gpt4 book ai didi

eclipselink - EclipseLink不会生成表

转载 作者:行者123 更新时间:2023-12-02 09:46:27 29 4
gpt4 key购买 nike

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

我使用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版本
  • 最新版本的glassfish
  • 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>

    最佳答案

    只需将这些行放在persistence.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" />

    关于eclipselink - EclipseLink不会生成表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18489886/

    29 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com