Hibernate中Many to one如何设置LAZY
来源:互联网 发布:淘宝助理mac下载 编辑:程序博客网 时间:2024/05/18 02:30
原先看到在Hibernate3之后可以在Many to one 的关系映射中设置lazy属性,
<many-to-one name="brother" column="brotherId" outer-join="false" lazy="no-proxy" insert="true" update="false" cascade="none"/>
还以为和one to many一样,只要将lazy设为true就可以在不加载关联的对象呢,结果这个lazy的属性值只有proxy no-proxy 和false,试了其中任何一个值,结果都还是加载了关联的对象,后来想起class可以设置lazy的属性,就把关联的brother对象的类的lazy属性设为true,然后many to one中的lazy设为no-proxy后就实现了延迟加载,如果将many to one中的lazy属性设为false,系统还是会自动初始化brother对象。
<class name="com.demo.bean.Brother" table="brother" lazy="true">
- Hibernate中Many to one如何设置LAZY
- Hibernate中Many to one如何设置LAZY
- Hibernate many-to-one的Lazy设置的问题
- Hibernate <many-to-one属性的设置
- hibernate many-to-one // one-to-many
- Hibernate中实现one-to-many
- hibernate 中many-to-one association (1)
- hibernate中one-to-many实例一
- hibernate中many-to-one实例一
- hibernate many-to-one
- hibernate one to many
- Hibernate one-to-many
- hibernate:many to one
- hibernate--one-to-many
- <many-to-one>设置
- hibernate中hbm.xml<many-to-one><one-to-many>中一些属性详解
- 关于Hibernate中many-to-one和one-to-many的一些理解
- Hibernate中的one-to-many
- 工厂方法模式
- ONJava.com -- JBoss Seam --> page 1
- 在JSP中访问数据库大全
- DIV模拟select
- 程序员成功之路 ——The road ahead for programmer(演讲稿)
- Hibernate中Many to one如何设置LAZY
- “回车”(carriage return)和“换行”(line feed)的来历和区别
- 反射是指用正常方法调用不到的时候使用的特殊方法
- Pro visual c++/cli and .net 2.0 platform2 学习笔记(11 第五章到第八章 )
- 读网
- 命名空间下包含的东西
- Pro visual c++/cli and .net 2.0 platform2 学习笔记(12 第九章到第十二章)
- 两种特别的类
- Reporting Service 点滴