java - 如何在 JPA Hibernate 中设置默认的 ConstraintMode
问题描述
当我为我的数据库生成 DDL 时,我不想有任何外键。
根据javax.persistence.ConstraintMode
有一个默认值:
/**
* Use the provider-defined default behavior.
*/
PROVIDER_DEFAULT
那么如何在 Hibernate 中设置默认值呢?
我通过 Spring Boot Data JPA 使用 Hibernate。
解决方案
I've fixed this in https://github.com/hibernate/hibernate-orm/commit/88acc9511b2e1c1cee7def27ba8dc717a8c321f8 , please check it out, thanks.
推荐阅读
- r - 如何绘制对数后验的轨迹(直至成比例)?
- mysql - Mysql 5.7 重复键的声明处理程序中的问题
- azure - 如何正确使用 CosmosDb 处理大于 2 Mb 的文档
- mysql - 多赛事锦标赛积分榜(任意数量的参赛作品)
- sql-server - 尝试在数据库中循环并创建函数时出现 SQL 错误
- html - Bootsrap 4 在移动设备上重叠粘性侧边栏
- c - 如何计算最长路径问题的复杂性?
- r - 从变量中将两列的值减去 1
- excel - 如果 x="cell value",则复制和粘贴行 x 次
- javascript - 如何使用回调使函数在 setTimeout 条件下依次执行