NHibernate loads full collection because it supports different cascading options for collections.
You will not be able to store bag
or set
as queryable for later SQL to be executed. The only optimization you can do is to set lazy="extra"
that will translate your Count, Contains queries to appropriate SQL, but not LINQ.