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 <[email protected]> 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 > queryIdentifier, IQueryExpression queryExpression, String > collectionRole, Boolean shallow, IDictionary`2 filters, > ISessionFactoryImplementor factory) > at > NHibernate.Engine.Query.HQLExpressionQueryPlan.CreateTranslators(String > expressionStr, IQueryExpression queryExpression, String > collectionRole, Boolean shallow, IDictionary`2 enabledFilters, > ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String > expressionStr, IQueryExpression queryExpression, String > collectionRole, Boolean shallow, IDictionary`2 enabledFilters, > ISessionFactoryImplementor factory) > at NHibernate.Engine.Query.HQLExpressionQueryPlan..ctor(String > expressionStr, IQueryExpression queryExpression, Boolean shallow, > IDictionary`2 enabledFilters, ISessionFactoryImplementor factory) > at > NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression > queryExpression, Boolean shallow, IDictionary`2 enabledFilters) > at > NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression > queryExpression, Boolean shallow) > at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression > queryExpression) > at NHibernate.Linq.NhQueryProvider.Execute(Expression expression) > at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression > expression) > at Remotion.Data.Linq.QueryableBase`1.GetEnumerator() > at System.Collections.Generic.List`1..ctor(IEnumerable`1 > collection) > at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
