I'm trying to use the new driver to support an OData webapi service.
I have "tenants" collection, a "tenant" document includes "applications" collection.
This query fails:
http://dev.api.axonize.com/odata/tenants?$expand=applications
With this stack trace:
{ "error":{ "code":"","message":"An error has occurred.","innererror":{ "message":"The expression tree is not supported: IIF(({document} == null), null, {document}{applications})","type":"System.NotSupportedException","stacktrace":" at MongoDB.Driver.Linq.Processors.EmbeddedPipeline.EmbeddedPipelineBinder.BindNonMethodCall(Expression node)\r\n at MongoDB.Driver.Linq.Processors.PipelineBinderBase`1.Bind(Expression node)\r\n at MongoDB.Driver.Linq.Processors.PipelineBinderBase`1.BindPipeline(Expression node)\r\n at MongoDB.Driver.Linq.Processors.PipelineBinderBase`1.BindMethodCall(MethodCallExpression node)\r\n at MongoDB.Driver.Linq.Processors.PipelineBinderBase`1.Bind(Expression node)\r\n at MongoDB.Driver.Linq.Processors.EmbeddedPipeline.EmbeddedPipelineBinder.Bind(Expression node, IBindingContext parent)\r\n at MongoDB.Driver.Linq.Processors.SerializationBinder.Visit(Expression node)\r\n at System.Linq.Expressions.ExpressionVisitor.VisitConditional(ConditionalExpression node)\r\n at MongoDB.Driver.Linq.Processors.SerializationBinder.Visit(Expression node)\r\n at System.Linq.Expressions.ExpressionVisitor.VisitMemberAssignment(MemberAssignment node)\r\n at System.Linq.Expressions.ExpressionVisitor.Visit[T](ReadOnlyCollection`1 nodes, Func`2 elementVisitor)\r\n at System.Linq.Expressions.ExpressionVisitor.VisitMemberInit(MemberInitExpression node)\r\n at MongoDB.Driver.Linq.Processors.SerializationBinder.Visit(Expression node)\r\n at System.Linq.Expressions.ExpressionVisitor.VisitMemberAssignment(MemberAssignment node)\r\n at System.Linq.Expressions.ExpressionVisitor.Visit[T](ReadOnlyCollection`1 nodes, Func`2 elementVisitor)\r\n at System.Linq.Expressions.ExpressionVisitor.VisitMemberInit(MemberInitExpression node)\r\n at MongoDB.Driver.Linq.Processors.SerializationBinder.Visit(Expression node)\r\n at System.Linq.Expressions.ExpressionVisitor.VisitMemberAssignment(MemberAssignment node)\r\n at System.Linq.Expressions.ExpressionVisitor.Visit[T](ReadOnlyCollection`1 nodes, Func`2 elementVisitor)\r\n at System.Linq.Expressions.ExpressionVisitor.VisitMemberInit(MemberInitExpression node)\r\n at MongoDB.Driver.Linq.Processors.SerializationBinder.Visit(Expression node)\r\n at MongoDB.Driver.Linq.Processors.Pipeline.MethodCallBinders.SelectBinder.Bind(PipelineExpression pipeline, PipelineBindingContext bindingContext, MethodCallExpression node, IEnumerable`1 arguments)\r\n at MongoDB.Driver.Linq.Processors.MethodInfoMethodCallBinder`1.Bind(PipelineExpression pipeline, TBindingContext bindingContext, MethodCallExpression node, IEnumerable`1 arguments)\r\n at MongoDB.Driver.Linq.Processors.PipelineBinderBase`1.BindMethodCall(MethodCallExpression node)\r\n at MongoDB.Driver.Linq.Processors.PipelineBinderBase`1.Bind(Expression node)\r\n at MongoDB.Driver.Linq.Processors.Pipeline.PipelineBinder.Bind(Expression node, IBsonSerializerRegistry serializerRegistry)\r\n at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Prepare(Expression expression)\r\n at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Translate(Expression expression)\r\n at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Execute(Expression expression)\r\n at MongoDB.Driver.Linq.MongoQueryableImpl`2.GetEnumerator()\r\n at System.Web.OData.Formatter.Serialization.ODataFeedSerializer.WriteFeed(IEnumerable enumerable, IEdmTypeReference feedType, ODataWriter writer, ODataSerializerContext writeContext)\r\n at System.Web.OData.Formatter.ODataMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content, HttpContentHeaders contentHeaders)\r\n at System.Web.OData.Formatter.ODataMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Owin.HttpMessageHandlerAdapter.d__13.MoveNext()" } } }
- is depended on by
-
CSHARP-3989 oDATA $select support with LINQ3
- Closed
- is duplicated by
-
CSHARP-1423 System.ArgumentException in BsonMemberMap.SetSerializer when trying to apply $select
- Closed
-
CSHARP-2120 Unable to filter nested document with oData
- Closed
-
CSHARP-3235 FormatException when using AutoMapper.ProjectTo
- Closed
-
CSHARP-3614 LINQ translation sometimes uses wrong element name in projection
- Closed
-
CSHARP-1467 Support of Inline Conditional-to-FilterDefinition
- Closed