JPA - How to set string column to varchar(max) in DDL

后端 未结 4 1807
有刺的猬
有刺的猬 2020-12-09 01:14

With JPA, DDL-generation for the attribute:

@Column
final String someString;

will be someString varchar(255) null



        
4条回答
  •  时光说笑
    2020-12-09 01:26

    Since length is defined in the JPA spec and javadocs as int type and max is not an int then it's safe to assume that you're consigned to the columnDefinition datastore-dependent route. But then varchar(max) is datastore-dependent anyway.

提交回复
热议问题