Hibernate 插入 MySQL LongText 异常

一、异常如下:

14:30:50,484 ERROR JDBCExceptionReporter:72 - Data truncation: Data too long for column 'content' at row 1
org.hibernate.exception.GenericJDBCException: could not insert: [com.jh.xh.hibernate.pojo.InfoTab]

二、程序代码:

private String content;
   
public void setContent(String content) {
      this.content = content;
}
public String getContent() {
      return this.content;
}

对应xml配置:

<property name="content" type="text">
   <column name="content" />
</property>

插入不到数据库表中。

你可能感兴趣的:(mysql,xml,Hibernate,Blog)