How to reproduce:

Query.All<DataFieldBase>().Where(a => a.LinkedEntity.Id.In(Guid.NewGuid())).ToArray();

class DataFieldBase : Werp.Model.Models.References.FormElement in test sent to you few times.

throws:

Xtensive.Orm.QueryTranslationException was unhandled
  Message=Unable to translate 'Query.All().Where(a => a.LinkedEntity.Id.In(new Guid[] {Guid.NewGuid()}))' expression. See inner exception for details.
  Source=Xtensive.Orm
  StackTrace:
       at Xtensive.Orm.Linq.QueryProvider.Translate[TResult](Expression expression)
       at Xtensive.Orm.Linq.QueryProvider.Execute[TResult](Expression expression)
       at Xtensive.Orm.Linq.Queryable`1.GetEnumerator()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
       at ConsoleApplication1.Program.Main(String[] args) in C:\Work\Test\ConsoleApplication1\Program.cs:line 52
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.ArgumentException
       Message=Argument types do not match
       Source=System.Core
       StackTrace:
            at System.Linq.Expressions.Expression.Condition(Expression test, Expression ifTrue, Expression ifFalse)
            at Xtensive.Orm.Linq.Translator.GetConditionalMember(Expression expression, MemberInfo member, Expression sourceExpression)
            at Xtensive.Orm.Linq.Translator.GetConditionalMember(Expression expression, MemberInfo member, Expression sourceExpression)
            at Xtensive.Orm.Linq.Translator.GetMember(Expression expression, MemberInfo member, Expression sourceExpression)
            at Xtensive.Orm.Linq.Translator.VisitMemberAccess(MemberExpression ma)
            at Xtensive.Linq.ExpressionVisitor`1.Visit(Expression e)
            at Xtensive.Orm.Linq.Translator.Visit(Expression e)
            at Xtensive.Orm.Linq.Translator.VisitBinary(BinaryExpression binaryExpression)
            at Xtensive.Linq.ExpressionVisitor`1.Visit(Expression e)
            at Xtensive.Orm.Linq.Translator.Visit(Expression e)
            at Xtensive.Orm.Linq.Translator.VisitLambda(LambdaExpression le)
            at Xtensive.Orm.Linq.Translator.VisitExists(Expression source, LambdaExpression predicate, Boolean notExists)
            at Xtensive.Orm.Linq.Translator.VisitContains(Expression source, Expression match, Boolean isRoot)
            at Xtensive.Orm.Linq.Translator.VisitIn(MethodCallExpression mc)
            at Xtensive.Orm.Linq.Translator.VisitMethodCall(MethodCallExpression mc)
            at Xtensive.Linq.ExpressionVisitor`1.Visit(Expression e)
            at Xtensive.Orm.Linq.Translator.Visit(Expression e)
            at Xtensive.Orm.Linq.Translator.VisitLambda(LambdaExpression le)
            at Xtensive.Orm.Linq.Translator.VisitWhere(Expression expression, LambdaExpression le)
            at Xtensive.Orm.Linq.Translator.VisitQueryableMethod(MethodCallExpression mc, QueryableMethodKind methodKind)
            at Xtensive.Linq.QueryableVisitor.VisitMethodCall(MethodCallExpression mc)
            at Xtensive.Orm.Linq.Translator.VisitMethodCall(MethodCallExpression mc)
            at Xtensive.Linq.ExpressionVisitor`1.Visit(Expression e)
            at Xtensive.Orm.Linq.Translator.Visit(Expression e)
            at Xtensive.Orm.Linq.Translator.Translate[TResult]()
            at Xtensive.Orm.Linq.QueryProvider.Translate[TResult](Expression expression)
       InnerException:

asked Oct 31 '11 at 07:39

pil0t's gravatar image

pil0t
207535763

Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×56
×5

Asked: Oct 31 '11 at 07:39

Seen: 821 times

Last updated: Oct 31 '11 at 07:39

powered by OSQA