Lazy Loading/Eager Loading

The NHibernate FAQ has a new post about complex object graphs and lazy loading.  If you use NHibernate (or, ActiveRecord -- which makes NHibernate a whole lot easier), it's worth a look.  The technique described can greatly improve the way your app interacts with the database.  OR mappers are nice, but you need to make sure you understand what is happening with the database calls that are made automatically by your OR framework.

If you're using ActiveRecord, here's a few more items regarding lazy loading:

Enabling Lazy Loading in ActiveRecord

Tuning ActiveRecord

Combating the Select N + 1 Problem In NHibernate

No Comments