I have a problem with SetFetchMode call in Criteria API in following query:
DetachedCriteria.For() .Add(u => u.Sta
Since you are using .CreateAlias("Companies", "comp"), NHibernate can't eager-load the collection, as you could be using restrictions on that alias.
.CreateAlias("Companies", "comp")
My overall suggestion is to never use eager load on collections. Use batch_size or this trick instead.
batch_size