Fixed
Details
Details
Assignee
Alex Zaytsev
Alex ZaytsevReporter
Daniel Guenter
Daniel GuenterLabels
Components
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created August 22, 2011 at 11:01 PM
Updated September 21, 2014 at 12:40 PM
Resolved June 4, 2012 at 8:03 PM
Using a deep recursion in a where statement
.Where(p => p.Address.City.Name == "Test")
will cause a ThenFetch statement to fail with the following exception.
"Query specified join fetching, but the owner of the fetched association was not present in the select list "
var query = session.Query<Person>()
.Where(p => p.Address.City.Name == "Test")
.Fetch(r => r.Address)
.ThenFetch(a => a.City);
Removing the where statement or shortening it will cause the query to pass.