leo*_*onm 6 hibernate lazy-loading
我有一个 Hibernate Entity,它有几个非常胖但很少使用的嵌入式对象。我想让嵌入的对象延迟加载,但理想情况下我不想将信息移动到单独的表中。
是否可能,以及如何注释要延迟加载的嵌入对象?
osd*_*amv 6
直接你不能,通过在对象中设置属性是你可以
@Basic(fetch=FetchType.LAZY)
你也应该阅读 http://docs.jboss.org/hibernate/core/3.3/reference/en/html/performance.html#performance-fetching-lazyproperties
归档时间:
14 年,2 月 前
查看次数:
7632 次
最近记录: