Got this figured out. The working code is: Models.RecipeMetadata metadata = null;var q = session.QueryOver<Recipes>(() => recipe) .JoinAlias(r => r.Metadata, () => metadata) .Where(() => metadata.SkillCommon) .Where(p => !p.Hidden);
On Thu, Jan 23, 2014 at 5:16 PM, Mike Christensen <[email protected]>wrote: > I'm kinda confused as to why this won't work: > > Models.Recipes recipe = null; > var q = session.QueryOver<Recipes>(() => recipe) > .Where(p => p.Metadata.SkillCommon) // <--- Problem > .Where(p => !p.Hidden); > > I get the error: > > An unhandled exception of type 'NHibernate.QueryException' occurred in > NHibernate.dll > > Additional information: could not resolve property: Metadata.SkillCommon > of: KitchenPC.DB.Models.Recipes > > Metadata is a one-to-one mapping of Recipes as such: > > HasOne(x => x.Metadata); > > If I look at the values under the debugger, everything is loaded. I just > can't query against it. Any ideas? > > Mike > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/groups/opt_out.
