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?
精彩评论