This is a mirror of official site: http://jasper-net.blogspot.com/

NHibernate Pitfalls: Fetch and Lazy

| Tuesday, September 20, 2011
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here.

When we use the fetch mode join for an association, we are implicitly using eager fetching, not lazy. Because the SELECT statement for the root entity already includes the association table, it will be loaded at the same time, so, it makes no sense to have fetch=”join” and lazy=”false” for an association; in this case, fetch will take precedence and disable lazy loading. Be aware if your association has lots of entities, and you don’t need it most of the time.

Read more: Development With A Dot
QR: nhibernate-pitfalls-join-and-fetch.aspx

Posted via email from Jasper-net

0 comments: