Closed
Description
Hello.
After update from 5.2.7 to 5.3.* we have some issue with custom QueryProvider. I make test application -
https://github.com/emejibka/nhibernate-specification-subquery-bug
System.NotSupportedException : Could not parse expression 'value(NHibernate.Linq.NhQueryable`1[TestApp.Client]).Where(Convert(value(TestApp.Specification`1[TestApp.Client])))': The given arguments did not match the expected arguments: Невозможно преобразовать объект типа "System.Linq.Expressions.UnaryExpression" к типу "System.Linq.Expressions.LambdaExpression".
в Remotion.Linq.Parsing.Structure.MethodCallExpressionParser.CreateExpressionNode(Type nodeType, MethodCallExpressionParseInfo parseInfo, Object[] additionalConstructorParameters)
в Remotion.Linq.Parsing.Structure.MethodCallExpressionParser.Parse(String associatedIdentifier, IExpressionNode source, IEnumerable`1 arguments, MethodCallExpression expressionToParse)
в Remotion.Linq.Parsing.Structure.ExpressionTreeParser.ParseMethodCallExpression(MethodCallExpression methodCallExpression, String associatedIdentifier)
в Remotion.Linq.Parsing.Structure.ExpressionTreeParser.ParseMethodCallExpression(MethodCallExpression methodCallExpression, String associatedIdentifier)
в Remotion.Linq.Parsing.Structure.ExpressionTreeParser.ParseTree(Expression expressionTree)
в Remotion.Linq.Parsing.Structure.QueryParser.GetParsedQuery(Expression expressionTreeRoot)
в Remotion.Linq.Parsing.ExpressionVisitors.SubQueryFindingExpressionVisitor.Visit(Expression expression)
в System.Linq.Expressions.ExpressionVisitor.VisitLambda[T](Expression`1 node)
в Remotion.Linq.Parsing.ExpressionVisitors.SubQueryFindingExpressionVisitor.Visit(Expression expression)
в Remotion.Linq.Parsing.Structure.MethodCallExpressionParser.ProcessArgumentExpression(Expression argumentExpression)
в System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
в System.Linq.Buffer`1..ctor(IEnumerable`1 source)
в System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
в Remotion.Linq.Parsing.Structure.MethodCallExpressionParser.Parse(String associatedIdentifier, IExpressionNode source, IEnumerable`1 arguments, MethodCallExpression expressionToParse)
в Remotion.Linq.Parsing.Structure.ExpressionTreeParser.ParseMethodCallExpression(MethodCallExpression methodCallExpression, String associatedIdentifier)
в Remotion.Linq.Parsing.Structure.ExpressionTreeParser.ParseTree(Expression expressionTree)
в Remotion.Linq.Parsing.Structure.QueryParser.GetParsedQuery(Expression expressionTreeRoot)
в NHibernate.Linq.NhLinqExpression.Translate(ISessionFactoryImplementor sessionFactory, Boolean filter)
в NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory)
в NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters)
в NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow)
в NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression)
в NHibernate.Linq.DefaultQueryProvider.PrepareQuery(Expression expression, IQuery& query)
в TestApp.CustomQueryProvider.PrepareQuery(Expression expression, IQuery& query) в C:\temp\nhibernate-specification-subquery-bug\CustomQueryProvider.cs:строка 17
в NHibernate.Linq.DefaultQueryProvider.ExecuteList[TResult](Expression expression)
в NHibernate.Linq.NhQueryable`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
в System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
в System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
в TestApp.TestClass.test() в C:\temp\nhibernate-specification-subquery-bug\TestClass.cs:строка 48