Hibernate Annotation中BLOB、CLOB注解写法
在hibernate Annotation中,实体BLOB、CLOB类型的注解与普通的实体属性有些不同,具体操作如下:BLOB类型,类型声明为byte[]:
@Lob @Basic(fetch = FetchType.EAGER) @Column(name="REMARK", columnDefinition="CLOB", nullable=true) public String getRemark() { return this.remark; } public void setRemark(String recvdocRemark) { this.remark = remark; }
按照以上的设置实体类的注解就搞定了。