【问题标题】:How to set default ConstraintMode in JPA Hibernate如何在 JPA Hibernate 中设置默认的 ConstraintMode
【发布时间】:2019-06-20 20:45:20
【问题描述】:

当我为我的数据库生成 DDL 时,我不想有任何外键。

根据javax.persistence.ConstraintMode有一个默认值:

/**
 * Use the provider-defined default behavior.
 */
PROVIDER_DEFAULT

那么如何在 Hibernate 中设置默认值?

我正在通过 Spring Boot Data JPA 使用 Hibernate。

【问题讨论】:

标签: java hibernate jpa spring-data-jpa


【解决方案1】:

我已经在 https://github.com/hibernate/hibernate-orm/commit/88acc9511b2e1c1cee7def27ba8dc717a8c321f8 中修复了这个问题,请检查一下,谢谢。

【讨论】:

    猜你喜欢
    • 2011-01-07
    • 2021-12-03
    • 2015-03-28
    • 1970-01-01
    • 1970-01-01
    • 2011-02-13
    • 2022-06-19
    • 1970-01-01
    相关资源
    最近更新 更多