我使用hibernate.hbm2ddl.auto
来创建我的表格。通过hibernate.hbm2ddl.auto创建具有更长文本字段的表格
创建我的专栏是这样的:
@Column(name = "foo", length = 8000)
private String foo;
这将创建一个表和字段:varchar(8000)
我需要什么,是我可以节省超过8000较长string
在那里。像20000或更多。
当更改length
高于8000
时,它不会创建表。
当手动更改字段,然后它说:
The size (20000) given to the column 'foo' exceeds the maximum allowed for
any data type (8000).
我建议你使用CLOB数据类型这么长的文本列 –
@RahulAgrawal和什么会在Java或注释类型是什么? – Jaanus