实体类content 是String类型 contentClob 是Clob类型
这里的content是oracle 里的列名
junit 测试
出现异常引起的原因
org.springframework.jdbc.UncategorizedSQLException: Hibernate flushing: could not insert: [com.tcardz.model.Article]; uncategorized SQLException for SQL [insert into TCARDZ.T_ARTICLE (ACTIVITYID, CARDID, COUNTID, ORGINALID, COMUNITYID, USERID, FOLDERID, CONTENT, TITLE, TYPE, CREATETIME, STATUS, OPENLEVEL, LOVECOUNT, LOVEIDS, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [null]; error code [0]; could not reset reader; nested exception is java.sql.SQLException: could not reset reader
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
at org.springframework.orm.hibernate3.HibernateTransactionManager.convertJdbcAccessException(HibernateTransactionManager.java:801)
at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:787)
这是为什么 ?
hibernate insert
你不用流去写进去直接set能好使才怪呢这个错应该是重复保存/读取 Clob type类型变量引起的上一个可能未flush到数据库,下一个又开始了
具体原因不明,不过setContent方法内为什么要设置两个属性呢