开发者

NH QueryOver FetchMany Exception

I am trying to query a parent User and then their UserRoleMappings. I have something similar to the below statement:

Dim userObj As User = session.Queryable(Of U开发者_Go百科ser)().Where(Function(x) x.username.Equals("someone")).FetchMany(Function(y) y.UserRoleMappings).SingleOrDefault()

When I try to run this statement I get the following exception:

A fetch request must be a simple member access expression; 'Convert(y.UserRoleMappings)' is a UnaryExpression instead. Parameter name: relatedObjectSelector

I can confirm that I got this to work in a C# Test Case, but unfortunately I need it to work in VB. Can anyone assist?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜