|
From: Vahid N. (JIRA) <nh...@gm...> - 2011-05-19 04:36:01
|
[ http://216.121.112.228/browse/NH-2712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21125#action_21125 ]
Vahid Nasiri commented on NH-2712:
----------------------------------
I think it should similar to:
https://www.re-motion.org/blogs/mix/2010/07/15/support-for-vb-specific-string-comparisons-in-re-linq
+
https://www.re-motion.org/blogs/mix/2009/10/16/vb.net-specific-text-comparison-in-linq-queries
> queryover doesn't support enums in VB.NET
> -----------------------------------------
>
> Key: NH-2712
> URL: http://216.121.112.228/browse/NH-2712
> Project: NHibernate
> Issue Type: Bug
> Components: Linq Provider
> Affects Versions: 3.0.0.Beta2
> Reporter: Matthew Beer
> Assignee: Patrick Earl
> Priority: Major
> Fix For: 3.1.0
>
>
> Comparing enums in a Linq query with VB.NET throws a NotSupportedException:
> Return (From invoice In session.Query(Of Invoice)()
> Where invoice.Payment.ElectronicInvoiceStatus = ElectronicInvoiceStatus.Unpaid
> Select invoice).Any()
> Message: ConvertChecked([-1].Payment.ElectronicInvoiceStatus)
> Stack Trace:
> at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitUnaryExpression(UnaryExpression expression)
> at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression)
> at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitBinaryExpression(BinaryExpression expression)
> at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.VisitExpression(Expression expression)
> at NHibernate.Linq.Visitors.HqlGeneratorExpressionTreeVisitor.Visit(Expression expression, VisitorParameters parameters)
> at NHibernate.Linq.Visitors.QueryModelVisitor.VisitWhereClause(WhereClause whereClause, QueryModel queryModel, Int32 index)
> at Remotion.Data.Linq.Clauses.WhereClause.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.PrepareQuery(Expression expression, IQuery& query, NhLinqExpression& nhQuery)
> at NHibernate.Linq.NhQueryProvider.Execute(Expression expression)
> at NHibernate.Linq.NhQueryProvider.Execute[TResult](Expression expression)
> at System.Linq.Queryable.Any[TSource](IQueryable`1 source)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|