Adding an NHibernate collection to your QuickWatch initializes it
I found these two links very useful for troubleshooting my performance issue:
http://djeeg.blogspot.com/2006/08/nhibernateutilisinitialized.html
and the NHibernate reference:
http://www.hibernate.org/hib_docs/nhibernate/html/performance.html
The curious thing is I got really confused when testing my
NHibernateUtil.IsInitialized(_myobject.MyCollection) line and it was false
but I saw a query retrieving the collection in Profiler...
until I realized that adding the collection to the Watch initializes it. The same happens if you open this collection in QuickWatch. :-p
Labels: NHibernate, Out of Curiosity