From: David A. (JIRA) <nh...@gm...> - 2010-12-29 19:44:22
|
[ http://216.121.112.228/browse/NHLQ-66?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20389#action_20389 ] David Alpert commented on NHLQ-66: ---------------------------------- love to see this one addressed... > Index was out of range, ToLower() method does not have any arguments > -------------------------------------------------------------------- > > Key: NHLQ-66 > URL: http://216.121.112.228/browse/NHLQ-66 > Project: NHibernate.Linq > Issue Type: Bug > Components: Core > Affects Versions: 1.0.0 > Reporter: Marco Barzaghi > Priority: Blocker > > This kinds of expressions > .Where( => (.Descrizione2.ToLower().Contains("aaa") = True)) > .Where( => (.Descrizione2.ToLower().StartsWith("aaa") = True)) > ... > thrown this exception: > at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) > at System.ThrowHelper.ThrowArgumentOutOfRangeException() > at System.SZArrayHelper.get_Item[T](Int32 index) > at System.Collections.ObjectModel.ReadOnlyCollection`1.get_Item(Int32 index) > at NHibernate.Linq.Visitors.MemberNameVisitor.VisitMethodCall(MethodCallExpression expr) > at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.MemberNameVisitor.GetMemberName(ICriteria rootCriteria, Expression expr) > at NHibernate.Linq.Visitors.WhereArgumentsVisitor.GetLikeCriteria(MethodCallExpression expr, MatchMode matchMode) > at NHibernate.Linq.Visitors.WhereArgumentsVisitor.VisitMethodCall(MethodCallExpression expr) > at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.ExpressionVisitor.VisitLambda(LambdaExpression lambda) > at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.WhereArgumentsVisitor.VisitUnary(UnaryExpression expr) > at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.WhereArgumentsVisitor.GetCriterion(ICriteria rootCriteria, ISession session, Expression expression) > at NHibernate.Linq.Visitors.RootVisitor.HandleWhereCall(MethodCallExpression call) > at NHibernate.Linq.Visitors.RootVisitor.VisitMethodCall(MethodCallExpression expr) > at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.RootVisitor.VisitMethodCall(MethodCallExpression expr) > at NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression exp) > at NHibernate.Linq.Visitors.NHibernateQueryTranslator.Translate(Expression expression, QueryOptions queryOptions) > at NHibernate.Linq.NHibernateQueryProvider.TranslateExpression(Expression expression) > at NHibernate.Linq.NHibernateQueryProvider.Execute(Expression expression) > at NHibernate.Linq.QueryProvider.System.Linq.IQueryProvider.Execute[T](Expression expression) > at System.Linq.Queryable.Count[TSource](IQueryable`1 source) > Right now with RIA based controls (custom ones but also MS standard) compose those kind of expression to solve the problem of case insentive. The problem is well described here http://www.telerik.com/community/forums/aspnet-mvc/grid/grid-and-nhibernate-linq.aspx. -- 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 |