OK, I can see it now.
The LINQ provider expects the expression to be:
<QuerySourceReferenceExpression> . <Member>
However, in the case of from brw in loan.Application.Borrowers it is:
<QuerySourceReferenceExpression> . <Member> . <Member>
So it's definately an unsupported feature, I can't think of a
workaround from the top of my head. The comment indicates that this
scenario was not considered (// What's this?)
I'd just file an issue.
Or try to remove this condition in
NHibernate.Linq.Visitors.QueryModelVisitor.VisitAdditionalFromClause
and build it:
if (member.Expression is QuerySourceReferenceExpression)
It might work, the HqlGeneratorExpressionTreeVisitor.Visit method at
least has code to handle MemberExpressions.
Cheers,
Stefan
On Sep 17, 4:24 pm, Aaron Fischer <
pretzelfi...@gmail.com> wrote:
> Sorry about that, I garbed the error message with out thinking.
> -----------------------------------
> System.NotSupportedException: Specified method is not supported.
> at
> NHibernate.Linq.Visitors.QueryModelVisitor.VisitAdditionalFromClause(AdditionalFromClause
> fromClause, QueryModel queryModel, Int32 index)
> at
> Remotion.Data.Linq.Clauses.AdditionalFromClause.Accept(IQueryModelVisitor
> visitor, QueryModel queryModel, Int32 index)
> at
> Remotion.Data.Linq.QueryModelVisitorBase.VisitBodyClauses(ObservableCollection`1
> bodyClauses, QueryModel queryModel)
> at
> Remotion.Data.Linq.QueryModelVisitorBase.VisitQueryModel(QueryModel
> queryModel)
> at NHibernate.Linq.Visitors.QueryModelVisitor.Visit()
> at
> NHibernate.Linq.Visitors.QueryModelVisitor.GenerateHqlQuery(QueryModel
> queryModel, VisitorParameters parameters, Boolean root)
> at
> NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor
> sessionFactory)
> at
> NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String