hibernate中"fetch all properties" 不起作用

按照hibernate reference所说

 

 写道
If you are using property-level lazy fetching (with bytecode instrumentation), it is possible to force
Hibernate to fetch the lazy properties in the first query immediately using fetch all properties.
from Document fetch all properties order by name
from Document doc fetch all properties where lower(doc.name) like '%cats%'

 只要加了fetch all properties,在这个list被执行出来后,即使我close session,应该还是可以访问Document中的(lazy-loading)属性的,但我自己的做的实验显示这个"fetch all properties"加和不加完全没有区别,该是lazy loading的还是一个都没加载。

 

在hibernate的jira找到了这样的bug,但其fixed version是3.1 beta 1,而我的hibernate 是 hibernate-core-3.3.0.SP1.jar,这是咋回事,莫非reopen了?

 

忍不住再吐槽一下,用toplink时只有oralce 一家support,但基本都能找到答案,用hibernate一会儿要上官网,一会儿上stackoverflow,还经常找不到答案,开源啊开源~~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值