Tar*_*ion 4 java postgresql hibernate
如果我将这样的列添加到现有实体,hibernate 将无法添加该列,因为存在没有值的现有行:
\n\n@Column(name = "width", nullable = false)\nprivate int width;\nRun Code Online (Sandbox Code Playgroud)\n\n失败并出现此错误:
\n\n2015-11-14 20:33:41.163 ERROR 9068 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : HHH000388: Unsuccessful: alter table texture add column width int4 not null\n2015-11-14 20:33:41.163 ERROR 9068 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaUpdate : FEHLER: Spalte \xe2\x80\x9ewidth\xe2\x80\x9c enth\xc3\xa4lt NULL-Werte\nRun Code Online (Sandbox Code Playgroud)\n\n我不想在我的数据库列定义中使用默认值。
\n| 归档时间: |
|
| 查看次数: |
1271 次 |
| 最近记录: |