按照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,还经常找不到答案,开源啊开源~~
分享到:
相关推荐
正确理解hibernate fetch 的作用
hibernate.properties # # Hibernate, Relational Persistence for Idiomatic Java # # License: GNU Lesser General Public License (LGPL), version 2.1 or later. # See the lgpl.txt file in the root directory...
主要介绍了hibernate 中 fetch=FetchType.LAZY 懒加载失败处理方法,需要的朋友可以参考下
19.1.2. 调整抓取策略(Tuning fetch strategies) 19.1.3. 单端关联代理(Single-ended association proxies) 19.1.4. 实例化集合和代理(Initializing collections and proxies) 19.1.5. 使用批量抓取(Using...
Hibernate fetch lazy cascade inverse 关键字
HIBERNATE - 符合Java习惯的关系数据库持久化 Hibernate参考文档 3.2 -------------------------------------------------------------------------------- 目录 前言 1. 翻译说明 2. 版权声明 1. Hibernate...
19.1.2. 调整抓取策略(Tuning fetch strategies) 19.1.3. 单端关联代理(Single-ended association proxies) 19.1.4. 实例化集合和代理(Initializing collections and proxies) 19.1.5. 使用批量抓取(Using...
19.1.2. 调整抓取策略(Tuning fetch strategies) 19.1.3. 单端关联代理(Single-ended association proxies) 19.1.4. 实例化集合和代理(Initializing collections and proxies) 19.1.5. 使用批量抓取(Using...
中取出的记录条数,一般设置为30、50、100.Oracle数据库的JDBC驱动默认的Fetch Size=15,设置Fetch Size设置为:30、50,性能会有明显提升,如果继续增大,超出100,性能提升不明显,反而会消耗内存。 即在...
Oracle 中使用 fetch bulk collect into 批量效率的读取游标数据
西门子 TCP通信中的Fetch和Write用法,PLC侧无需编程,公开的通信格式
HIBERNATE - 符合Java习惯的关系数据库持久化 Hibernate参考文档 3.2 -------------------------------------------------------------------------------- 目录 前言 1. 翻译说明 2. 版权声明 1. Hibernate...
electron-main-fetch:在Electron的主要进程中使用浏览器Fetch API
http://blog.csdn.net/e421083458/article/details/8794127 该源码为Hibernate教程配套源码
西门子PLC实现基于CP的中FETCH写使用入门zip,西门子PLC实现基于CP的中FETCH写使用入门:西门子的以太网通信模板提供了一种基于TCP的FETCH WRITE 通信方式,该方式无需在PLC侧编程就可以得到PLC内的所有数据,可以...
Fetch Robot
i. 如果不加fetch关键字,则hibernate不会抓取关系属性,但会遍历关系属性所对应的表 ii. 不加fetch关键字时,select 要指定返回的对象,否则它要返回数组 iii. 条件:持久化类之间有关系属性映射 Hibernate级联...
如果本地上传失败一般应该是数据集不全,下载本数据源可以解决 from sklearn.datasets import fetch_lfw_people faces = fetch_lfw_people() 执行上面的第二行程序,python会从网上下载labeled_face_wild people数据...
Hibernate配置各种数据源 <hibernate-configuration> <!– 各属性的配置–> <!—为true表示将Hibernate发送给数据库的sql显示出来 –> ”show_sql”>true <!– SQL方言,这边设定的是MySQL –> ”dialect”>...
一个微小的ES6 fetch() 包装不需要对API大动干戈