首页 > 解决方案 > 如何在 JPA Hibernate 中设置默认的 ConstraintMode

问题描述

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

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

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

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

我通过 Spring Boot Data JPA 使用 Hibernate。

标签: javahibernatejpaspring-data-jpa

解决方案



推荐阅读