Linq-ing Calculated Properties

67 views
Skip to first unread message

Azar Gurbanov

unread,
Jan 27, 2018, 4:39:51 PM1/27/18
to nhusers
Hi all,


I cannot get it working.  Throws the following exception when the query is executed: 

NHibernate.Hql.Ast.ANTLR.InvalidPathException: Invalid path ‘x.Weight’

One workaround I found was to replace the linq parameter name, so the following query from the example:

from parcel in Session.Query<Parcel> where parcel.Fee > 1000 select parcel;

would become:

from x in Session.Query<Parcel> where x.Fee > 1000 select x;

Michael Berkowitz

unread,
Dec 14, 2020, 3:21:20 AM12/14/20
to nhusers
I'm suddenly encountering this problem, whereas I'm sure I had this working earlier!  Has anyone made progress on it?

Michael Berkowitz

unread,
Dec 15, 2020, 4:56:25 AM12/15/20
to nhusers
Reply all
Reply to author
Forward
0 new messages