Hi, I'm upgrading from NHibernate 2.1.2 to 3.2.0. We were using a the Linq provider a lot so I am making converting to the new built-in Linq provider.
The following query is throwing a not supported exception: Session.Query<Foo>() .Where(x => x.Code == "testcode") .Where(x => x.Bar.Id = 7) .Take(5) .OrderBy(x => x.Name) .ThenBy(x => x.Code) .ToList(); Removing the Take() fixes the issue. The full stack trace is: at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.GetClassName(IASTNode querySource) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR \PolymorphicQuerySourceDetector.cs: line 58 at NHibernate.Hql.Ast.ANTLR.PolymorphicQuerySourceDetector.Process(IASTNode tree) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR \PolymorphicQuerySourceDetector.cs: line 25 at NHibernate.Hql.Ast.ANTLR.AstPolymorphicProcessor.Process() in d: \CSharp\NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR \AstPolymorphicProcessor.cs: line 30 at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(IASTNode ast, String queryIdentifier, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in d:\CSharp \NH\NH\nhibernate\src\NHibernate\Hql\Ast\ANTLR \ASTQueryTranslatorFactory.cs: line 33 at NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String queryIdentifier, IQueryExpression queryExpression, String collectionRole, Boolean shallow, IDictionary`2 filters, ISessionFactoryImplementor factory) in d:\CSharp\NH\NH\nhibernate\src \NHibernate\Hql\Ast\ANTLR\ASTQueryTranslatorFactory.cs: line 27 at NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow, IDictionary`2 enabledFilters) in d: \CSharp\NH\NH\nhibernate\src\NHibernate\Engine\Query \QueryPlanCache.cs: line 88 at NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(IQueryExpression queryExpression, Boolean shallow) in d:\CSharp\NH\NH\nhibernate\src \NHibernate\Impl\AbstractSessionImpl.cs: line 312 at NHibernate.Impl.AbstractSessionImpl.CreateQuery(IQueryExpression queryExpression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl \AbstractSessionImpl.cs: line 268 at NHibernate.Linq.DefaultQueryProvider.PrepareQuery(Expression expression, ref IQuery query, ref NhLinqExpression nhQuery) in d: \CSharp\NH\NH\nhibernate\src\NHibernate\Linq\DefaultQueryProvider.cs: line 69 at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Linq \DefaultQueryProvider.cs: line 33 at NHibernate.Linq.DefaultQueryProvider.Execute(Expression expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Linq \DefaultQueryProvider.cs: line 40 at Remotion.Linq.QueryableBase`1.GetEnumerator() in :line 0 -- 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.
