<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:49:26 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-4813] Verify more carefully that property named Count is a collection property</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4813</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;When having a property of type long named Count, the translation of a Linq-query with greater than fails.&lt;/em&gt;&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;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Test document:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &lt;em&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;BsonIgnoreExtraElements&amp;#93;&lt;/span&gt;&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &lt;em&gt;public class TestDoc&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &lt;em&gt;{&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;public long Count { get; set; }&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &lt;em&gt;}&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Code:&lt;/em&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;var settings = MongoClientSettings.FromConnectionString(&quot;mongodb://localhost&quot;);&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;settings.LinqProvider = MongoDB.Driver.Linq.LinqProvider.V3;&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;var client = new MongoClient(settings);&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;var db = client.GetDatabase(&quot;test&quot;);&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;var coll = db.GetCollection&amp;lt;TestDoc&amp;gt;(&quot;long_count_fail&quot;);&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;var doc = new TestDoc() { Count = 123 };&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;await coll.InsertOneAsync(doc);&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;var countGreaterThanZero = coll.AsQueryable().Where(x =&amp;gt; x.Count &amp;gt; 0).ToList();&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;Console.WriteLine(countGreaterThanZero.Count); &#160;// 0 &amp;#8211; failure&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;var countEquals123 = coll.AsQueryable().Where(x =&amp;gt; x.Count == 123).ToList();&lt;/em&gt;&lt;br/&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &lt;em&gt;Console.WriteLine(countEquals123.Count); &#160;// &amp;gt;= 1 &amp;#8211; works&lt;/em&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;&lt;em&gt;In Version 2,20.0 of the driver, the failure could not be observed, a change in v2.22.0 is suspected to cause the error.&lt;/em&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2476274">CSHARP-4813</key>
            <summary>Verify more carefully that property named Count is a collection property</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="m.wildgruber@sevantage.de">Markus Wildgruber</reporter>
                        <labels>
                    </labels>
                <created>Tue, 17 Oct 2023 13:00:20 +0000</created>
                <updated>Thu, 7 Dec 2023 18:26:37 +0000</updated>
                            <resolved>Thu, 7 Dec 2023 18:26:37 +0000</resolved>
                                    <version>2.22.0</version>
                                    <fixVersion>2.23.0</fixVersion>
                                                        <votes>2</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="5933739" author="xgen-internal-githook" created="Thu, 7 Dec 2023 18:25:33 +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-4813&quot; title=&quot;Verify more carefully that property named Count is a collection property&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4813&quot;&gt;&lt;del&gt;CSHARP-4813&lt;/del&gt;&lt;/a&gt;: Verify more carefully that property named Count is a collection method.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/8365a619214cfcf67659f5d647435654c8e3c1ef&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/8365a619214cfcf67659f5d647435654c8e3c1ef&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="5786792" author="m.wildgruber@sevantage.de" created="Wed, 18 Oct 2023 06:11:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=robert%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;robert@mongodb.com&quot;&gt;robert@mongodb.com&lt;/a&gt; thank you for the quick response &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/thumbs_up.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="5785077" author="rstam" created="Tue, 17 Oct 2023 15:28:47 +0000"  >&lt;p&gt;Thanks for reporting this. I am able to reproduce it and am working on a fix.&lt;/p&gt;</comment>
                            <comment id="5784216" author="dbeng-pm-bot" created="Tue, 17 Oct 2023 13:00:23 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=m.wildgruber%40sevantage.de&quot; class=&quot;user-hover&quot; rel=&quot;m.wildgruber@sevantage.de&quot;&gt;m.wildgruber@sevantage.de&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>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></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_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|i2e9po:</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>