<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:48:35 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-4557] LINQ3 produces ExpressionNotSupported error on ContainsKey</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4557</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;After upgrading from version 2.18.0 to 2.19.0, I encountered this error in my project:&lt;/p&gt;

&lt;p&gt;{{MongoDB.Driver.Linq.ExpressionNotSupportedException: Expression not supported: x.Foo.ContainsKey(&quot;bar&quot;)&lt;br/&gt;
}}&lt;br/&gt;
After explicitly setting the LinqProvider back to V2, the error disappears.&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Pleaseprovidetheversionofthedriver.Ifapplicable%2CpleaseprovidetheMongoDBserverversionandtopology%28standalone%2Creplicaset%2Corshardedcluster%29.&quot;&gt;&lt;/a&gt;Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).&lt;/h4&gt;
&lt;h4&gt;&lt;a name=&quot;Driverversion%3A2.19.0&quot;&gt;&lt;/a&gt;Driver version: 2.19.0&lt;/h4&gt;
&lt;p&gt;Server version: 5.0.15&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;For a collection of documents in this format:&lt;/p&gt;

&lt;p&gt;{{{}}&lt;br/&gt;
&#160;&#160;&#160; _id: ...,&lt;br/&gt;
&#160;&#160;&#160; Foo: &lt;/p&gt;
{
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;bar&quot;: 100,
&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;baz&quot;: 200
&#160;&#160;&#160; }
&lt;p&gt;&lt;tt&gt;}&lt;/tt&gt;&lt;br/&gt;
Create an IQueryable and perform the following LINQ query:&lt;br/&gt;
&lt;tt&gt;entities.Where(x =&amp;gt; x.Foo.ContainsKey(&quot;bar&quot;));&lt;/tt&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;I&apos;m not sure what else would be useful to add here, but I&apos;m happy to provide further details if required.&lt;/p&gt;</description>
                <environment></environment>
        <key id="2279762">CSHARP-4557</key>
            <summary>LINQ3 produces ExpressionNotSupported error on ContainsKey</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="13201">Fixed</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="chris.dueck@avcosystems.com">Chris Dueck</reporter>
                        <labels>
                            <label>LINQ</label>
                            <label>LINQ3</label>
                    </labels>
                <created>Thu, 2 Mar 2023 16:28:28 +0000</created>
                <updated>Sat, 28 Oct 2023 11:46:56 +0000</updated>
                            <resolved>Fri, 17 Mar 2023 21:55:54 +0000</resolved>
                                    <version>2.19.0</version>
                                    <fixVersion>2.19.1</fixVersion>
                                    <component>LINQ3</component>
                                        <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5299674" author="xgen-internal-githook" created="Fri, 24 Mar 2023 19:00:19 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;, &apos;username&apos;: &apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4557&quot; title=&quot;LINQ3 produces ExpressionNotSupported error on ContainsKey&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4557&quot;&gt;&lt;del&gt;CSHARP-4557&lt;/del&gt;&lt;/a&gt;: Add support for ContainsKey in LINQ3.&lt;br/&gt;
Branch: v2.19.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/4284dde38ce9f5dc7b9769d97f2d0f17633e129d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/4284dde38ce9f5dc7b9769d97f2d0f17633e129d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5294016" author="JIRAUSER1273228" created="Thu, 23 Mar 2023 00:07:20 +0000"  >&lt;p&gt;Thanks for the fix!&lt;/p&gt;

&lt;p&gt;We were bit by this issue as well.&lt;/p&gt;

&lt;p&gt;Is there a planned release date for &lt;b&gt;2.19.1&lt;/b&gt;?&lt;/p&gt;</comment>
                            <comment id="5281860" author="xgen-internal-githook" created="Fri, 17 Mar 2023 21:55:26 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;rstam&apos;, &apos;email&apos;: &apos;robert@robertstam.org&apos;, &apos;username&apos;: &apos;rstam&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4557&quot; title=&quot;LINQ3 produces ExpressionNotSupported error on ContainsKey&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4557&quot;&gt;&lt;del&gt;CSHARP-4557&lt;/del&gt;&lt;/a&gt;: Add support for ContainsKey in LINQ3.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/757ca5f572585c829f86da9a99914788e51e4ca0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/757ca5f572585c829f86da9a99914788e51e4ca0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5280065" author="JIRAUSER1273164" created="Fri, 17 Mar 2023 10:33:50 +0000"  >&lt;p&gt;Same issue here, v2.19 of Driver.&lt;/p&gt;</comment>
                            <comment id="5276306" author="rstam" created="Thu, 16 Mar 2023 01:33:24 +0000"  >&lt;p&gt;LINQ2 supported ContainsKey in filters, but not in aggregation expressions. LINQ3 will support ContainsKey in both scenarios.&lt;/p&gt;</comment>
                            <comment id="5260675" author="brecht.vanhaesebrouck@sea-invest.com" created="Thu, 9 Mar 2023 07:52:34 +0000"  >&lt;p&gt;I am having the same issue.&lt;/p&gt;</comment>
                            <comment id="5256609" author="rstam" created="Tue, 7 Mar 2023 20:05:54 +0000"  >&lt;p&gt;Thanks for reporting this. I will investigate further before long.&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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i1h15k:</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>