数据库中字段为CLOB的属性,在Java实体类中将CLOB转化为String
数据库中字段为CLOB的属性,在Java实体类中不能使用CLOB去声明,否则会报错。
解决方法:
@Lob
@Basic(fetch = FetchType.EAGER)
@Column(name = "THEORY_CONTENT", columnDefinition = "CLOB", nullable = true)
private String theoryContent;
这样,就ok了,经过测试是可以的。
数据库中字段为CLOB的属性,在Java实体类中不能使用CLOB去声明,否则会报错。
解决方法:
@Lob
@Basic(fetch = FetchType.EAGER)
@Column(name = "THEORY_CONTENT", columnDefinition = "CLOB", nullable = true)
private String theoryContent;
这样,就ok了,经过测试是可以的。