代码如下,通过`
query.setParameter(i, Hibernate.createClob(formValue.get(params[i])));
并不行,不能插入大文本
SQLQuery query = null;
String params[] =sqlSources.get(paramID).split(",");
query = jbpmContext.getSession().createSQLQuery(sqlSources.get(sqlID));
for(int i=0,len = params.length; i<len; i++){
//log.info(params[i] +":===:"+formValue.get(params[i]));
if (params[i].equals("CF_CONTENT")) {
query.setParameter(i, Hibernate.createClob(formValue.get(params[i])));
}else {
query.setString(i, formValue.get(params[i]));
}
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…