hibernate
@lob 通常与@basic同时使用,提高访问速度。
@lob
@basic(fetch = fetchtype.lazy)
@column(name=dtacontent, columndefinition=clob, nullable=true)
public string getdtacontent() {
return dtacontent;
}
@basic 实体bean中所有的非static 非transient的属性都可以被持久化,没有定义注解属性的等价于在其上添加了@basic注解
通过@basic注解可以声明属性的获取策略(lazy与否),默认的是即时获取(early fetch),这里又讨论到了
延迟关联获取和延迟属性获取,通常不需要对简单属性设置延迟获取,如需要定义@basic(fetch=fetchtype.lazy)
