Hello
I use hibernate 3.6.1 and I need set a parameter with a clob, but don't work.
My code is:
values.add(Hibernate.getLobCreator(hbSession).createClob(paramValue)); types.add(new MaterializedClobType()); or types.add(new ClobType());
Used at: crit.add(Restrictions.sqlRestriction(sqlExpression, values.toArray(), types.toArray(new Type[values.size()])));
And Other code: ClobType ct = new ClobType(); ct.fromString(param); query.setParameter(paramsVal[0], ct, ClobType.INSTANCE); Query is a SqlQuery
The SQL code is: SELECT * FROM PRODUCT WHERE ID IN (SELECT * FROM TABLE(in_list_clob( ? )))
The error is: java.lang.ClassCastException: $Proxy62 cannot be cast to java.lang.String
Thanks for help.
|