There are several ways to eagerly load entities depending on what you
need, for example NHibernateUtil.Initialize(), HQL's join fetch, etc.
Take a look at this article, it explains them all:
http://nhforge.org/wikis/howtonh/lazy-loading-eager-loading.aspx

On Aug 5, 11:27 am, bdaniel7 <[email protected]> wrote:
> Hi,
> I have an Incident, which is [Lazy].
> Incident has an Address, which is also lazy.
>
> But sometimes, when I load a collection of Incident, and the filter
> doesn't have an Address field,
> and i try to check some address i get this LazyInitializationException
> from NH.
>
> If i remove the [Lazy] from Address all goes well.
>
> Now, is it possible to force loading a lazy property/entity?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to