<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:48: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-4665] ExpressionNotSupportedException for string.IsNullOrWhitespace after upgrade</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4665</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;&lt;em&gt;I am running MongoDb 6.0.6&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;WhenupgradingfromMongodbdriver2.18to2.19.2severalqueriesIrunbegintofailwiththeExpressionNotSupportedException.&quot;&gt;&lt;/a&gt;When upgrading from Mongodbdriver 2.18 to 2.19.2 several queries I run begin to fail with the ExpressionNotSupportedException.&lt;/h4&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;
&lt;p&gt;&#160;&lt;br/&gt;
Query on any string field e.g&lt;br/&gt;
&#160;&lt;br/&gt;
_profileDataCollection.&lt;font color=&quot;#74531f&quot;&gt;Find&lt;/font&gt;(&lt;font color=&quot;#1f377f&quot;&gt;model&lt;/font&gt;.&lt;font color=&quot;#74531f&quot;&gt;GetFilter&lt;/font&gt;())&lt;br/&gt;
.&lt;font color=&quot;#74531f&quot;&gt;Project&lt;/font&gt;(&lt;font color=&quot;#1f377f&quot;&gt;x &lt;/font&gt;=&amp;gt; &lt;font color=&quot;#0000ff&quot;&gt;new &lt;/font&gt;&lt;font color=&quot;#2b91af&quot;&gt;ProfileReportModel&lt;/font&gt;&lt;font color=&quot;#2b91af&quot;&gt; &lt;/font&gt;{&lt;br/&gt;
Id = &lt;font color=&quot;#1f377f&quot;&gt;x&lt;/font&gt;.Id,&lt;br/&gt;
Bio = !&lt;font color=&quot;#0000ff&quot;&gt;string&lt;/font&gt;.&lt;font color=&quot;#74531f&quot;&gt;IsNullOrWhiteSpace&lt;/font&gt;(&lt;font color=&quot;#1f377f&quot;&gt;x&lt;/font&gt;.Bio),&lt;br/&gt;
CurrentStatus = !&lt;font color=&quot;#0000ff&quot;&gt;string&lt;/font&gt;.IsNullOrWhiteSpace(x.CurrentStatus)&lt;br/&gt;
&#160;&lt;br/&gt;
In this example Bio and CurrentStatus are string fields&lt;br/&gt;
&#160;&lt;br/&gt;
Downgrading the connection to LinqProvider.V2 fixes the issue:&lt;br/&gt;
&#160;&lt;br/&gt;
&lt;font color=&quot;#0000ff&quot;&gt;var &lt;/font&gt;&lt;font color=&quot;#1f377f&quot;&gt;clientSettings &lt;/font&gt;= &lt;font color=&quot;#2b91af&quot;&gt;MongoClientSettings&lt;/font&gt;.&lt;font color=&quot;#74531f&quot;&gt;FromConnectionString&lt;/font&gt;(Configuration.&lt;font color=&quot;#74531f&quot;&gt;GetConnectionString&lt;/font&gt;(&lt;font color=&quot;#0000ff&quot;&gt;nameof&lt;/font&gt;(&lt;font color=&quot;#2b91af&quot;&gt;StudentProfile&lt;/font&gt;)));&lt;br/&gt;
&lt;font color=&quot;#1f377f&quot;&gt;clientSettings&lt;/font&gt;.LinqProvider = &lt;font color=&quot;#2b91af&quot;&gt;LinqProvider&lt;/font&gt;.V2;&lt;br/&gt;
&lt;font color=&quot;#0000ff&quot;&gt;var client = new &lt;/font&gt;&lt;font color=&quot;#2b91af&quot;&gt;MongoClient&lt;/font&gt;(&lt;font color=&quot;#1f377f&quot;&gt;clientSettings&lt;/font&gt;);&lt;/p&gt;


&lt;p&gt;It appears to be similar to this issue:&lt;br/&gt;
&lt;a href=&quot;https://www.mongodb.com/community/forums/t/issue-with-2-18-to-2-19-nuget-upgrade-of-mongodb-c-driver/211894&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/community/forums/t/issue-with-2-18-to-2-19-nuget-upgrade-of-mongodb-c-driver/211894&lt;/a&gt;&lt;br/&gt;
&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2356710">CSHARP-4665</key>
            <summary>ExpressionNotSupportedException for string.IsNullOrWhitespace after upgrade</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="9">Done</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="john.staveley@myglobalbridge.com">John Staveley</reporter>
                        <labels>
                    </labels>
                <created>Fri, 2 Jun 2023 06:55:42 +0000</created>
                <updated>Wed, 28 Jun 2023 00:05:12 +0000</updated>
                            <resolved>Wed, 28 Jun 2023 00:05:12 +0000</resolved>
                                                    <fixVersion>2.21.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5529645" author="xgen-internal-githook" created="Wed, 28 Jun 2023 00:00:34 +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-4665&quot; title=&quot;ExpressionNotSupportedException for string.IsNullOrWhitespace after upgrade&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4665&quot;&gt;&lt;del&gt;CSHARP-4665&lt;/del&gt;&lt;/a&gt;: Add LINQ3 support for IsNullOrWhiteSpace.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/5974753edd6f61f391257b818469128c7f08cd51&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/5974753edd6f61f391257b818469128c7f08cd51&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5516002" author="rstam" created="Wed, 21 Jun 2023 17:11:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4683&quot; title=&quot;Rename Linq3ImplementationTests folder to Linq3Implementation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4683&quot;&gt;&lt;del&gt;CSHARP-4683&lt;/del&gt;&lt;/a&gt; is justified for its own reasons, but for this issue we depend on it because &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4683&quot; title=&quot;Rename Linq3ImplementationTests folder to Linq3Implementation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4683&quot;&gt;&lt;del&gt;CSHARP-4683&lt;/del&gt;&lt;/a&gt; shortens paths just enough to keep the new file paths in this PR below the 260 limit imposed by Windows.&lt;/p&gt;</comment>
                            <comment id="5476688" author="rstam" created="Tue, 6 Jun 2023 00:42:45 +0000"  >&lt;p&gt;I&apos;ve added support in LINQ3 for IsNullOrWhiteSpace.&lt;/p&gt;

&lt;p&gt;Note that in the case of a Find projection, this only worked in LINQ2 because LINQ2 would sometimes execute things it couldn&apos;t translate to MQL client-side. In this case LINQ2 would fetch the values from the server and compute the IsNullOrWhiteSpace result client-side.&lt;/p&gt;

&lt;p&gt;Other than that, LINQ2 had no support for IsNullOrWhiteSpace.&lt;/p&gt;

&lt;p&gt;LINQ3 never executes anything client-side. This is a deliberate design decision that we made. With this fix, when using LINQ3 these types of projections will now work as long as you are using version 4.4 or newer of the server (that was the version that added support for $project style projections with expressions for find).&lt;/p&gt;</comment>
                            <comment id="5469691" author="dbeng-pm-bot" created="Fri, 2 Jun 2023 06:55:44 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=john.staveley%40myglobalbridge.com&quot; class=&quot;user-hover&quot; rel=&quot;john.staveley@myglobalbridge.com&quot;&gt;john.staveley@myglobalbridge.com&lt;/a&gt;, thank you for reporting this issue! The team will look into it and get back to you soon. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="2373842">CSHARP-4683</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|i1u5c8:</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>