{"issue":{"created_at":"2011-11-28T15:11:13Z","state":"open","updated_at":"2011-11-28T17:01:22Z","user":{"gravatar_id":"e33f854c0327da83214184ebdc3e40e9","id":744703,"url":"https://api.github.com/users/Kostassoid","avatar_url":"https://secure.gravatar.com/avatar/e33f854c0327da83214184ebdc3e40e9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"Kostassoid"},"comments":2,"body":"When querying something like:\r\n\r\n    experts.Where(e => authorsIds.Contains(e.Id)).ToList()\r\n\r\nwhere experts is a fluent-mongo Queryable collection and authorsIds is just some List<Guid>.\r\n\r\nId is declared as\r\n\r\n    public Guid Id { get; protected set; }\r\n\r\nI'm getting:\r\n\r\nFluentMongo.Linq.InvalidQueryException : A mongo field must be a part of the Contains method.\r\nat FluentMongo.Linq.Translators.BsonDocumentFormatter.VisitMethodCall(MethodCallExpression m) in D:\\Projects\\ExternalLibs\\fluent-mongo\\src\\FluentMongo\\Linq\\Translators\\BsonDocumentFormatter.cs: line 196\r\nat FluentMongo.Linq.Expressions.ExpressionVisitor.Visit(Expression exp) in D:\\Projects\\ExternalLibs\\fluent-mongo\\src\\FluentMongo\\Linq\\Expressions\\ExpressionVisitor.cs: line 62\r\nat FluentMongo.Linq.Translators.MongoQueryObjectBuilder.VisitSelect(SelectExpression select) in D:\\Projects\\ExternalLibs\\fluent-mongo\\src\\FluentMongo\\Linq\\Translators\\MongoQueryObjectBuilder.cs: line 81\r\nat FluentMongo.Linq.Translators.MongoQueryObjectBuilder.VisitProjection(ProjectionExpression projection) in D:\\Projects\\ExternalLibs\\fluent-mongo\\src\\FluentMongo\\Linq\\Translators\\MongoQueryObjectBuilder.cs: line 87\r\nat FluentMongo.Linq.Translators.MongoQueryObjectBuilder.Build(Expression expression) in D:\\Projects\\ExternalLibs\\fluent-mongo\\src\\FluentMongo\\Linq\\Translators\\MongoQueryObjectBuilder.cs: line 19\r\nat FluentMongo.Linq.ExecutionBuilder.VisitProjection(ProjectionExpression projection) in D:\\Projects\\ExternalLibs\\fluent-mongo\\src\\FluentMongo\\Linq\\ExecutionBuilder.cs: line 21\r\nat FluentMongo.Linq.MongoQueryProvider.Execute(Expression expression) in D:\\Projects\\ExternalLibs\\fluent-mongo\\src\\FluentMongo\\Linq\\MongoQueryProvider.cs: line 98\r\nat FluentMongo.Linq.MongoQuery`1.GetEnumerator() in D:\\Projects\\ExternalLibs\\fluent-mongo\\src\\FluentMongo\\Linq\\MongoQuery.cs: line 102\r\nat System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\nat System.Linq.Enumerable.ToList(IEnumerable`1 source)\r\nat Finam.WorldEye.Service.BackOfficeService.HydrateOpinions(IList`1 opinions) in OpinionService.cs: line 40\r\nat Finam.WorldEye.Service.BackOfficeService.GetOpinionsFor(Guid topic) in OpinionService.cs: line 58\r\nat Castle.Proxies.Invocations.IOpinionService_GetOpinionsFor.InvokeMethodOnTarget()\r\nat Castle.DynamicProxy.AbstractInvocation.Proceed()\r\nat Finam.WorldEye.Configuration.Interceptors.RetryInterceptor.Intercept(IInvocation invocation) in RetryInterceptor.cs: line 33\r\nat Castle.DynamicProxy.AbstractInvocation.Proceed()\r\nat Finam.WorldEye.Service.Interceptors.BusinessContextInterceptor.Intercept(IInvocation invocation) in BusinessContextInterceptor.cs: line 25\r\nat Castle.DynamicProxy.AbstractInvocation.Proceed()\r\nat Finam.WorldEye.Configuration.Interceptors.OpLogInterceptor.Intercept(IInvocation invocation) in OpLogInterceptor.cs: line 84\r\nat Castle.DynamicProxy.AbstractInvocation.Proceed()\r\nat Castle.Proxies.IBackOfficeServiceProxy.GetOpinionsFor(Guid topic)\r\nat Finam.WorldEye.Service.Tests.BackOfficeServiceSpecs.when_retrieving_existing_opinions_for_topic.operation_should_succeed() in BackOfficeServiceSpecs.cs: line 896 ","assignee":null,"id":2368230,"number":40,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"\"A mongo field must be a part of the Contains method.\" when querying using Id property","closed_at":null,"html_url":"https://github.com/craiggwilson/fluent-mongo/issues/40","url":"https://api.github.com/repos/craiggwilson/fluent-mongo/issues/40","milestone":null},"action":"created","comment":{"created_at":"2011-11-28T17:01:22Z","updated_at":"2011-11-28T17:01:22Z","user":{"gravatar_id":"1a3fe0ef24651f2c23d52b6f1ecd9fbf","id":167901,"url":"https://api.github.com/users/craiggwilson","avatar_url":"https://secure.gravatar.com/avatar/1a3fe0ef24651f2c23d52b6f1ecd9fbf?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"craiggwilson"},"body":"Sounds like we aren't handling nullable types very well.","id":2901633,"url":"https://api.github.com/repos/craiggwilson/fluent-mongo/issues/comments/2901633"}}