<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:39:57 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-1554] OData get fails when using $expand</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1554</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;When using OData and sending $expand option with linq on the new driver (IMongoCollection) it throws exception:&lt;br/&gt;
&quot;error&quot;: {&lt;br/&gt;
    &quot;code&quot;: &quot;&quot;,&lt;br/&gt;
    &quot;message&quot;: &quot;An error has occurred.&quot;,&lt;br/&gt;
    &quot;innererror&quot;: {&lt;br/&gt;
      &quot;message&quot;: &quot;The &apos;ObjectContent`1&apos; type failed to serialize the response body for content type &apos;application/json; odata.metadata=minimal&apos;.&quot;,&lt;br/&gt;
      &quot;type&quot;: &quot;System.InvalidOperationException&quot;,&lt;br/&gt;
      &quot;stacktrace&quot;: &quot;&quot;,&lt;br/&gt;
      &quot;internalexception&quot;: {&lt;br/&gt;
        &quot;message&quot;: &quot;The expression tree is not supported: IIF((&lt;/p&gt;
{document} == null), null, {document}
{groups}
&lt;p&gt;)&quot;,&lt;br/&gt;
        &quot;type&quot;: &quot;System.NotSupportedException&quot;,&lt;br/&gt;
        &quot;stacktrace&quot;: &quot;   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&lt;span class=&quot;error&quot;&gt;&amp;#91;T&amp;#93;&lt;/span&gt;(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&lt;span class=&quot;error&quot;&gt;&amp;#91;T&amp;#93;&lt;/span&gt;(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&lt;span class=&quot;error&quot;&gt;&amp;#91;T&amp;#93;&lt;/span&gt;(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.WebHost.HttpControllerHandler.&amp;lt;WriteBufferedResponseContentAsync&amp;gt;d__1b.MoveNext()&quot;&lt;br/&gt;
      }&lt;br/&gt;
    }&lt;br/&gt;
  }&lt;/p&gt;</description>
                <environment>Windows, Asp.Net OData web api</environment>
        <key id="262788">CSHARP-1554</key>
            <summary>OData get fails when using $expand</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="omricohen">Omri Cohen</reporter>
                        <labels>
                    </labels>
                <created>Wed, 3 Feb 2016 10:46:02 +0000</created>
                <updated>Wed, 12 Dec 2018 14:51:01 +0000</updated>
                            <resolved>Mon, 10 Dec 2018 20:55:28 +0000</resolved>
                                    <version>2.2.2</version>
                                                    <component>Linq</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="2088385" author="ian@10gen.com" created="Wed, 12 Dec 2018 14:51:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=omricohen&quot; class=&quot;user-hover&quot; rel=&quot;omricohen&quot;&gt;omricohen&lt;/a&gt; Many apologies for the delay, we&apos;re just digging ourselves out of a big backlog now.  We have no plans to work on OData support for the foreseeable future and so we&apos;d prefer to just close this so as to communicate the real state of our roadmap.&lt;/p&gt;</comment>
                            <comment id="2086816" author="omricohen" created="Tue, 11 Dec 2018 12:42:14 +0000"  >&lt;p&gt;It took you almost 3 years to close it because you don&apos;t support OData?&lt;br/&gt;
Wouldn&apos;t it be easier to support OData?&lt;br/&gt;
I think it&apos;s a mistake to abandon this great protocol and would make companies to upgrade to CosmosDB.&lt;/p&gt;</comment>
                            <comment id="2086261" author="ian@10gen.com" created="Mon, 10 Dec 2018 20:55:28 +0000"  >&lt;p&gt;Closing as Won&apos;t Fix since we do not support OData.&lt;/p&gt;</comment>
                            <comment id="1165727" author="omricohen" created="Sat, 6 Feb 2016 08:42:32 +0000"  >&lt;p&gt;Sure, &lt;a href=&quot;http://api.ourserver.com/odata/Devices?$expand=groups&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://api.ourserver.com/odata/Devices?$expand=groups&lt;/a&gt;&lt;br/&gt;
Where groups is a navigation property on Device entity.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;DataMember(Name = &amp;quot;groups&amp;quot;)&amp;#93;&lt;/span&gt;&lt;br/&gt;
public IList&amp;lt;GroupNode&amp;gt; Groups &lt;/p&gt;
{ get; set; }

&lt;p&gt;Device entity in Mongo:&lt;br/&gt;
{&lt;br/&gt;
 _id:value,&lt;br/&gt;
groups:&lt;span class=&quot;error&quot;&gt;&amp;#91;{_id:value, name:value},{_id:value, name:value}&amp;#93;&lt;/span&gt;&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;BTW, It works perfect with the old driver but I don&apos;t want one code path for selecting (old driver) and another code path for changing data (new driver)&lt;br/&gt;
Thanks!&lt;/p&gt;</comment>
                            <comment id="1162247" author="craiggwilson" created="Wed, 3 Feb 2016 14:09:48 +0000"  >&lt;p&gt;Hi Omri, &lt;/p&gt;

&lt;p&gt;We haven&apos;t specifically supported OData. However, I&apos;ll add this into our undecided bucket for now. I&apos;ll also do a little investigation to see if this is something else entirely. Could you please provide the entire OData query string so I can see exactly what the expression going into the driver is?&lt;/p&gt;

&lt;p&gt;Craig&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrax9z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>