<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:40:24 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-1691] Select with create new object throw exception</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1691</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Hello. In c# driver version 2.0.1.-rc this is code was worked.&lt;/p&gt;

&lt;p&gt;public class Person&lt;br/&gt;
    {&lt;br/&gt;
        public string Id &lt;/p&gt;
{ get; set; }&lt;br/&gt;
        public string Name { get; set; }
&lt;p&gt;    }&lt;/p&gt;

&lt;p&gt;    public class SubObject&lt;br/&gt;
    {&lt;br/&gt;
        public Person Pers &lt;/p&gt;
{ get; set; }&lt;br/&gt;
        public string SomeData { get; set; }

&lt;p&gt;        public SubObject(Person pers, string someData)&lt;/p&gt;
        {
            Pers = pers;
            SomeData = someData;
        }
&lt;p&gt;    }&lt;/p&gt;

&lt;p&gt;static void Main(string[] args)&lt;br/&gt;
        {&lt;br/&gt;
            MongoClient client = new MongoClient(&quot;mongodb://localhost&quot;);&lt;br/&gt;
            var database = client.GetDatabase(&quot;TestDataBase&quot;);&lt;br/&gt;
            var objectsCollection = database.GetCollection&amp;lt;Person&amp;gt;(&quot;TestCollection&quot;);&lt;br/&gt;
            objectsCollection.Database.DropCollection(objectsCollection.CollectionNamespace.CollectionName);&lt;/p&gt;

&lt;p&gt;            var person = new Person() &lt;/p&gt;
{ Id = &quot;12&quot;, Name = &quot;Alex&quot; }
&lt;p&gt;;&lt;br/&gt;
            objectsCollection.InsertOne(person);&lt;br/&gt;
            person = new Person() &lt;/p&gt;
{ Id = &quot;34&quot;, Name = &quot;Timmy&quot; }
&lt;p&gt;;&lt;br/&gt;
            objectsCollection.InsertOne(person);&lt;/p&gt;

&lt;p&gt;            var result1 = objectsCollection.AsQueryable().Where(o =&amp;gt; o.Name.Length &amp;gt; 4).ToList(); // return 1 object&lt;br/&gt;
            var result2 = objectsCollection.AsQueryable().Where(o =&amp;gt; o.Name.Length &amp;gt; 4).Select(o =&amp;gt; new SubObject(o, &quot;test text&quot;)).ToList();&lt;br/&gt;
        } // this code worked in 2.0.1-rc, but don&apos;t work in 2.2.4&lt;/p&gt;

&lt;p&gt;This is bug or not?&lt;/p&gt;</description>
                <environment>Windows</environment>
        <key id="295073">CSHARP-1691</key>
            <summary>Select with create new object throw exception</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="3">Duplicate</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="IlyaK">Ilya</reporter>
                        <labels>
                            <label>triaged</label>
                    </labels>
                <created>Mon, 20 Jun 2016 10:52:36 +0000</created>
                <updated>Wed, 15 Jun 2022 22:15:38 +0000</updated>
                            <resolved>Wed, 15 Jun 2022 22:15:38 +0000</resolved>
                                    <version>2.2.4</version>
                                                    <component>Linq</component>
                    <component>LINQ3</component>
                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="4619271" author="rstam" created="Wed, 15 Jun 2022 22:15:38 +0000"  >&lt;p&gt;This ticket was originally opened against LINQ2, but we&apos;re no longer enhancing LINQ2. We have an equivalent ticket &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-3922&quot; title=&quot;LINQ3: support calls to constructors in Select&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-3922&quot;&gt;&lt;del&gt;CSHARP-3922&lt;/del&gt;&lt;/a&gt; for the same feature in LINQ3.&lt;/p&gt;</comment>
                            <comment id="1333890" author="ilyak" created="Mon, 25 Jul 2016 09:27:47 +0000"  >&lt;p&gt;Can anybody comment this issue?&lt;/p&gt;</comment>
                            <comment id="1299427" author="ilyak" created="Mon, 20 Jun 2016 11:04:30 +0000"  >&lt;p&gt;Exception: An unhandled exception of type &apos;System.NotSupportedException&apos; occurred in MongoDB.Driver.dll&lt;br/&gt;
Additional information: $project or $group does not support &lt;/p&gt;
{document}</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="1902750">CSHARP-3922</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="374585">CSHARP-1963</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>CSHARP-3615</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr499b:</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>