java - Querying CLOB column with hibernate criteria -
i have table like
table name: items columns : name type id number status varchar2 data clob
i have hibernate mapping below
@entity @table(name="items", uniqueconstraints = {@uniqueconstraint(columnnames={"id"})}) public class hitem implements serializable { private long id; private string status; private string datajson; @column(name = "id") public long getid() { return id; } @column(name = "status") public string getstatus() { return status; } @column(name = "data") public string getdatajson() { return datajson; } }
and querying data using criteria follows
list<hitem> items = helper.getsession().createcriteria(hitem.class) .add(restrictions.eq("status", "a")).list();
since have more 1200 matching records in table, throwing jdbc batch update error. suspect due large number of clob data getting caused.
can please me how can fetch clob data through criteria?
please try use @lob annotation. see here :
Comments
Post a Comment