<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:59 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-840] Query.Not does not handle $where correctly</title>
                <link>https://jira.mongodb.org/browse/CSHARP-840</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;There is a mistake in the method Not() of MongoDB.Driver.Builders.Query.&lt;/p&gt;

&lt;p&gt;Line:&lt;br/&gt;
MongoDB.Driver\Builders\QueryBuilder.cs(513): return new QueryDocument(elementName, new BsonDocument(&quot;$ne&quot;, operatorValue));&lt;/p&gt;

&lt;p&gt;Presumably there should be &quot;$not&quot; instead of &quot;$ne&quot;.&lt;/p&gt;

&lt;p&gt;Now a valid Where query { &quot;$where&quot; : &lt;/p&gt;
{ &quot;$code&quot; : &quot;this.Length == null&quot; }
&lt;p&gt; } is converted by Not() into invalid { &quot;$where&quot; : { &quot;$ne&quot; : &lt;/p&gt;
{ &quot;$code&quot; : &quot;this.Length == null&quot; }
&lt;p&gt; } } which fails with an error:&lt;/p&gt;

&lt;p&gt;$where expression has an unexpected type (response: &lt;/p&gt;
{ &quot;errmsg&quot; : &quot;exception: $where expression has an unexpected type&quot;, &quot;code&quot; : 15902, &quot;ok&quot; : 0.0 }
&lt;p&gt;)&lt;/p&gt;

&lt;p&gt;Driver version 1.8.3&lt;/p&gt;</description>
                <environment></environment>
        <key id="93719">CSHARP-840</key>
            <summary>Query.Not does not handle $where correctly</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="9">Done</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="nightroman">Roman Kuzmin</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 Oct 2013 19:45:25 +0000</created>
                <updated>Thu, 2 Apr 2015 18:28:04 +0000</updated>
                            <resolved>Sat, 19 Oct 2013 03:36:19 +0000</resolved>
                                    <version>1.8.3</version>
                                    <fixVersion>1.9</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="443406" author="auto" created="Sat, 19 Oct 2013 03:35:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rstam&apos;, u&apos;name&apos;: u&apos;rstam&apos;, u&apos;email&apos;: u&apos;robert@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-840&quot; title=&quot;Query.Not does not handle $where correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-840&quot;&gt;&lt;del&gt;CSHARP-840&lt;/del&gt;&lt;/a&gt;: Refactor implementation of Query.Not from one complex method to several smaller ones. Change QueryBuilder unit tests so all tests test for the negated version of the query as well.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/42d6984a554629af5dd61ecaa062eab911cf3585&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/42d6984a554629af5dd61ecaa062eab911cf3585&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="443405" author="auto" created="Sat, 19 Oct 2013 03:35:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rstam&apos;, u&apos;name&apos;: u&apos;Robert Stam&apos;, u&apos;email&apos;: u&apos;robert@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-840&quot; title=&quot;Query.Not does not handle $where correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-840&quot;&gt;&lt;del&gt;CSHARP-840&lt;/del&gt;&lt;/a&gt;: A more general fix for $operators and stricter checking for when equality testing is implied.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/11ebe3082d5db0fac998279746cce4d0cd5969b2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/11ebe3082d5db0fac998279746cce4d0cd5969b2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="443404" author="auto" created="Sat, 19 Oct 2013 03:35:45 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;rstam&apos;, u&apos;name&apos;: u&apos;Robert Stam&apos;, u&apos;email&apos;: u&apos;robert@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-840&quot; title=&quot;Query.Not does not handle $where correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-840&quot;&gt;&lt;del&gt;CSHARP-840&lt;/del&gt;&lt;/a&gt;: Handle $where correctly in Query.Not.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/f43533d1642981c1f54c701b3dad675f148c2178&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/f43533d1642981c1f54c701b3dad675f148c2178&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="439400" author="rstam" created="Fri, 11 Oct 2013 02:31:32 +0000"  >&lt;p&gt;In code review. Branch:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/rstam/mongo-csharp-driver/tree/csharp840&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/rstam/mongo-csharp-driver/tree/csharp840&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="439197" author="rstam" created="Thu, 10 Oct 2013 20:32:28 +0000"  >&lt;p&gt;I think the bug is that we assume that anything that doesn&apos;t match all the tests above that line must be an equality comparison, which as you have shown isn&apos;t always true.&lt;/p&gt;

&lt;p&gt;When we fix this we will also be sure to be more robust in the face of any future query operators that are introduced.&lt;/p&gt;

&lt;p&gt;Thanks for report this.&lt;/p&gt;</comment>
                            <comment id="439190" author="nightroman" created="Thu, 10 Oct 2013 20:25:05 +0000"  >&lt;p&gt;Or, if &quot;$ne&quot; still makes sense for other cases, then a special case for negation of $where should be added.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10012"><![CDATA[Major Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <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|hrtgpr:</customfieldvalue>

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