Linq Fetch through components has no effect

Description

Eager-Fetching a entity on a component does not work, there is no error but Nhibernate does not load the entity after all.

Example:

session.Query<Company>()
.Fetch(x => x.Component)
.ThenFetch(y => y.Entity)

Expected: Person.Component.Entity should be initialized.

It is strange because in https://nhibernate.jira.com/browse/NH-2615#icft=NH-2615 there was some work on this topic but it does not work for me.

Environment

None

Activity

Show:
Ricardo Peres
September 1, 2014 at 10:43 AM
David Roth
February 15, 2013 at 1:00 PM

Test-Case Location moved (new username), new location: https://github.com/davidroth/nhibernate-core/tree/NH3373

David Roth
January 18, 2013 at 8:12 AM

Ah sorry, thanks for the info, yes it is a duplicate.
My post on https://nhibernate.jira.com/browse/NH-2769#icft=NH-2769 is a bit further in the past and I forgot about it, thx for pointing out.

cremor
January 18, 2013 at 6:15 AM

This seems to be a duplicate of NH-2769, but since you have already commented on that issue I assume you did know about it's existance. So what is the difference between the two bugs?

David Roth
January 17, 2013 at 3:45 PM

I pushed a test-case for this issue: https://github.com/davrot/nhibernate-core/tree/NH3373

Duplicate

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created January 11, 2013 at 5:22 PM
Updated July 27, 2018 at 10:09 AM
Resolved September 1, 2014 at 11:26 PM
Who's Looking?