浏览 5257 次
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-03-20
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> 插入不到数据库表中。 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2007-03-20
大哥...
我真想顶你几下呢.. 加个ID字段就OK了... 记得改配置文件呢.. |
|
返回顶楼 | |
发表时间:2007-03-20
coolyi88 写道 大哥...
private Integer id;我真想顶你几下呢.. 加个ID字段就OK了... 记得改配置文件呢.. public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } <id name="id" type="java.lang.Integer"> <column name="Id" /> <generator class="native"></generator> </id> 插入少量可以,但内容多的话就报错了。 |
|
返回顶楼 | |
发表时间:2007-03-20
content类型不对吧,换个可以装大数据的类型
|
|
返回顶楼 | |
发表时间:2007-03-23
问题不在这里,原因我写到我的另一博客了
http://maomao.blog.51cto.com |
|
返回顶楼 | |