I have an entity (UserAccount) that has a one-to-many relationship with anohter entity (AccessRight) which references again another entity (Application). All relationships are loaded lazy.
I now try to set the fetchmode for accessright to Eager and the fetchmode of Application to eager.
var criteria = DetachedCriteria.For<UserAccount>();
criteria.SetFetchMode<UserAccount>(uc => uc.AccessRights, FetchMode.Eager);
criteria.SetFetchMode<AccessRight>(ac => ac.Application, FetchMode.Eager);
The access rights are fetched together with the useraccount, but the applications are lazy loaded. It is kind of logical because there is no link between the criteria of UserAccount and the Application-property of its AccessRights.
Is it possible to define the fetchmode of Application using the criteria of UserAccount? How can we do this?