除非你显式的指定lazy="false"禁止 延迟抓取(lazy fetching),否则只有当你真正访问关联关系的时候,才会执行第二条select语句。明显这个是延迟装载的。
基于40个网页-相关网页
如果你使用属性级别的延迟获取(lazy fetching)(这是通过重新编写字节码实现的),可以使用 fetch all properties 来强制Hibernate立即取得那些原本需要延迟加载的属性(在第...
基于12个网页-相关网页
Eager and Lazy Fetching 立即取和延迟取
Using lazy property fetching 使用延迟属性抓取
lazy association fetching 延时关联获取
Lazy collection fetching 延迟集合抓取
lazy proxy fetching 延迟代理抓取
Lazy attribute fetching 延迟属性加载
This code overrides the default lazy fetching strategy for the employee's address association.
这个调用覆盖职员地址关联默认的惰性抓取策略。
Although lazy fetching should be the primary fetching strategy for most applications, it does add a few complications.
尽管惰性抓取应该作为大多数应用程序的主要抓取策略,但是它增加了复杂性。
By default, if lazy fetching is used, 11 queries will be executed - one for the list of employees and one for each employee's address.
如果使用惰性抓取,在默认情况下将执行11个查询—执行一个查询获取职员的列表,然后为获取每个职员的地址各执行一次查询。
应用推荐