-
Notifications
You must be signed in to change notification settings - Fork 936
Closed
Milestone
Description
I have a Linq query that looks like this:
session.Query<MyEntity>()
.Fetch(x => x.UnrelatedManyToOneProperty)
.Fetch(x => x.ComponentProperty).ThenFetch(x => x.ManyToOneInComponent)
.Where(x => x.Id == someId)
.ToArray();
This query worked in NHibernate 5.2.7 (although it didn't actually fetch the many-to-one in the component, see #1232). But with NHibernate 5.3.2 this query now throws an exception:
InvalidOperationException: Property x.ComponentProperty does not exist on entity TypeOfUnrelatedManyToOneProperty
at NHibernate.Persister.Entity.AbstractEntityPersister.PropertySelectFragment(String name, String suffix, ICollection`1 fetchProperties, Boolean allProperties)
If I remove the .Fetch(x => x.UnrelatedManyToOneProperty)
part of the query it works (and even correctly fetches the many-to-one in the component, which means that #1232 was fixed, except that we now have this regression).