除非你显式的指定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 延迟属性加载
Lazy fetching minimizes the amount of data queried from the database.
惰性抓取可以尽可能减少从数据库查询到的数据量。
GDS supports both proxy (single-valued association) and lazy fetching for collections.
GDS既支持代理(单值关联关系),也为集合支持懒抓取。
Lazy fetching should almost always be used as your default association-fetching strategy.
在大多数情况下,应该使用惰性抓取作为默认的关联抓取策略。
应用推荐