<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:40:29 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-1719] Selecting from a IMongoQueryable collection with a Linq Expression throws an error because of &apos;Id&apos; property</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1719</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Using the mongoDb c# driver 2.2.4, selecting from a IMongoQueryable collection with a Linq Expression throws an error because of my Id field.&lt;/p&gt;

&lt;p&gt;The exception thrown is &apos;Element &apos;Id&apos; does not match any field or property of class MongoDbHierarchicalStoring.Man.&apos;&lt;/p&gt;

&lt;p&gt;You can find more info on the stackoverflow post: &lt;a href=&quot;http://stackoverflow.com/questions/38508622/selecting-from-a-imongoqueryable-collection-with-a-linq-expression-throws-an-err&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://stackoverflow.com/questions/38508622/selecting-from-a-imongoqueryable-collection-with-a-linq-expression-throws-an-err&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I change my &apos;Id&apos; property and rename it &apos;_id&apos;, it worked. But in a prior version of the driver (2.1.1) it used to work fine. &lt;br/&gt;
The sample you can find in the attached file proves it : testing with the old version of the driver retrieves the data where as the new version throws an exception.&lt;/p&gt;</description>
                <environment>Windows 7 64bits</environment>
        <key id="302964">CSHARP-1719</key>
            <summary>Selecting from a IMongoQueryable collection with a Linq Expression throws an error because of &apos;Id&apos; property</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="-1">Unassigned</assignee>
                                    <reporter username="Flo">Florent BROUCA</reporter>
                        <labels>
                    </labels>
                <created>Thu, 21 Jul 2016 16:15:18 +0000</created>
                <updated>Wed, 9 Nov 2022 20:56:17 +0000</updated>
                            <resolved>Wed, 9 Nov 2022 20:56:17 +0000</resolved>
                                    <version>2.2.4</version>
                                    <fixVersion>2.3</fixVersion>
                                    <component>Linq</component>
                    <component>Serialization</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4968451" author="james.kovacs" created="Wed, 9 Nov 2022 20:56:17 +0000"  >&lt;p&gt;Works in both LINQ2 and LINQ3 with the latest driver.&lt;/p&gt;</comment>
                            <comment id="1711850" author="jeff.yemin" created="Sat, 28 Oct 2017 03:24:07 +0000"  >&lt;p&gt;Ping &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=rstam&quot; class=&quot;user-hover&quot; rel=&quot;rstam&quot;&gt;rstam&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1462552" author="rstam" created="Tue, 20 Dec 2016 21:36:31 +0000"  >&lt;p&gt;I can reproduce this against 2.4.0 with the code you provided.&lt;/p&gt;

&lt;p&gt;It&apos;s not so much a regression as a new scenario that the original fix didn&apos;t contemplate.&lt;/p&gt;

&lt;p&gt;The original fix was for LINQ expressions. Your sample code is using the fluent aggregate API.&lt;/p&gt;</comment>
                            <comment id="1403216" author="james.kovacs" created="Fri, 7 Oct 2016 18:38:47 +0000"  >&lt;p&gt;There appears to be a regression. In C# Driver 2.4.0-beta1, the attached code, &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1719&quot; title=&quot;Selecting from a IMongoQueryable collection with a Linq Expression throws an error because of &amp;#39;Id&amp;#39; property&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1719&quot;&gt;&lt;del&gt;CSHARP-1719&lt;/del&gt;&lt;/a&gt;-Regression.zip, results in the error &quot;Element &apos;Id&apos; does not match any field or property of class ConsoleApplication.Root.&quot; Built on OSX Sierra using .NET Core 1.0.0-preview2-003131. Renaming `CSharp1719.Id` to `CSharp1719._id` causes the code to run without throwing the exception.&lt;/p&gt;</comment>
                            <comment id="1353352" author="xgen-internal-githook" created="Wed, 10 Aug 2016 20:24:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;craiggwilson&apos;, u&apos;name&apos;: u&apos;Craig Wilson&apos;, u&apos;email&apos;: u&apos;craiggwilson@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1719&quot; title=&quot;Selecting from a IMongoQueryable collection with a Linq Expression throws an error because of &amp;#39;Id&amp;#39; property&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1719&quot;&gt;&lt;del&gt;CSHARP-1719&lt;/del&gt;&lt;/a&gt;: supporting projections into identity type.&lt;br/&gt;
Branch: v2.4.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/ad81ac6e3781931fb6d2240e6100d1c03d8c375f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/ad81ac6e3781931fb6d2240e6100d1c03d8c375f&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1353328" author="xgen-internal-githook" created="Wed, 10 Aug 2016 20:10:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;craiggwilson&apos;, u&apos;name&apos;: u&apos;Craig Wilson&apos;, u&apos;email&apos;: u&apos;craiggwilson@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1719&quot; title=&quot;Selecting from a IMongoQueryable collection with a Linq Expression throws an error because of &amp;#39;Id&amp;#39; property&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1719&quot;&gt;&lt;del&gt;CSHARP-1719&lt;/del&gt;&lt;/a&gt;: supporting projections into identity type.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/ad81ac6e3781931fb6d2240e6100d1c03d8c375f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/ad81ac6e3781931fb6d2240e6100d1c03d8c375f&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="262790">CSHARP-1555</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="140892" name="CSHARP-1719-Regression.zip" size="1032" author="james.kovacs@mongodb.com" created="Fri, 7 Oct 2016 18:40:35 +0000"/>
                            <attachment id="131866" name="bug.cs" size="2008" author="Flo" created="Thu, 21 Jul 2016 16:15:18 +0000"/>
                    </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr4993:</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>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="1189">C# Sprint 40</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>