Lazy initialization in NHibernate

If the object is compared with the relation to another object as Lazy = False, but for some function I need to get them all Lenko, is it possible to do this at runtime?

+4
source share
1 answer

No, you can’t. As commentators noted, you can display it as lazy and receive it impatiently, but not vice versa.

those. in LINQ you can get relationships using Fetch / FetchMany / ThenFetch / ThenFetchMany :

 session.Query<Parent>() .Where(x => x.Name == "Ruba") .FetchMany(x => x.Children) .ThenFetch(x => x.SomethingMore); 
+3
source

All Articles