views:

169

answers:

1

In my application I want to cache data loaded with NHibernate. I don't want to use the second level cache of NHibernate as this cache is not really meant to cache an entire graph of objects. But what is the best strategy to make sure I don' have any lazy loading proxies and/or collections in my graph?

A: 

NHibernate.NHibernateUtil.Initialize(object proxy)
"Force initialization of a proxy or persistent collection."

Simon Svensson