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 :

lob


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -