<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:40:04 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-1589] OfType doesn&apos;t work for an embedded array.</title>
                <link>https://jira.mongodb.org/browse/CSHARP-1589</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;please find method which calls to get people entries with casting to derived class object&lt;/p&gt;



&lt;p&gt;var people = database.GetDatabase(&quot;Test&quot;) .GetCollection&amp;lt;Person&amp;gt;(&quot;People&quot;).AsQueryable();&lt;br/&gt;
            var x = people.Where(z =&amp;gt; z.Addresses.OfType&amp;lt;Email&amp;gt;().Any(e =&amp;gt; e.MailTo == &quot;not@home.com&quot;));&lt;br/&gt;
 throws an exception:&lt;br/&gt;
&quot;The method OfType is not supported in the expression tree: &lt;/p&gt;
{document}
{Addresses}
&lt;p&gt;.OfType().&quot;&lt;/p&gt;

&lt;p&gt;class Person&lt;br/&gt;
        {&lt;br/&gt;
            public List&amp;lt;Address&amp;gt; Addresses &lt;/p&gt;
{ get; set; }&lt;br/&gt;
        }&lt;br/&gt;
        class Address&lt;br/&gt;
        {&lt;br/&gt;
        }&lt;br/&gt;
        class Phone : Address&lt;br/&gt;
        {&lt;br/&gt;
            public string Number { get; set; }
&lt;p&gt;        }&lt;br/&gt;
        class Email : Address&lt;br/&gt;
        {&lt;br/&gt;
            public string MailTo &lt;/p&gt;
{ get; set; }
&lt;p&gt;        }&lt;/p&gt;
</description>
                <environment>c# / net 4.5, mongo 3.2.3</environment>
        <key id="269523">CSHARP-1589</key>
            <summary>OfType doesn&apos;t work for an embedded array.</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="craig.wilson@mongodb.com">Craig Wilson</assignee>
                                    <reporter username="profesor79">Greg</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Wed, 2 Mar 2016 22:35:43 +0000</created>
                <updated>Wed, 18 May 2016 20:32:54 +0000</updated>
                            <resolved>Mon, 14 Mar 2016 20:44:10 +0000</resolved>
                                    <version>2.2.3</version>
                                    <fixVersion>2.2.4</fixVersion>
                                    <component>API</component>
                                        <votes>2</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1203000" author="xgen-internal-githook" created="Mon, 14 Mar 2016 20:42:57 +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-1589&quot; title=&quot;OfType doesn&amp;#39;t work for an embedded array.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1589&quot;&gt;&lt;del&gt;CSHARP-1589&lt;/del&gt;&lt;/a&gt;: allow OfType to be used on embedded arrays.&lt;br/&gt;
Branch: v2.2.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/063356d1f85f781ed3c15b565d6ec9a306148baf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/063356d1f85f781ed3c15b565d6ec9a306148baf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1202998" author="xgen-internal-githook" created="Mon, 14 Mar 2016 20:42:27 +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-1589&quot; title=&quot;OfType doesn&amp;#39;t work for an embedded array.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1589&quot;&gt;&lt;del&gt;CSHARP-1589&lt;/del&gt;&lt;/a&gt;: allow OfType to be used on embedded arrays.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/10b034e1d5a814d963c05d8942b657589c0d4d75&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/10b034e1d5a814d963c05d8942b657589c0d4d75&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1191178" author="profesor79" created="Wed, 2 Mar 2016 22:36:53 +0000"  >&lt;p&gt;stack overflow source: &lt;a href=&quot;http://stackoverflow.com/questions/35758112/find-a-mongodb-document-based-on-element-match-of-a-specific-subtype-type&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://stackoverflow.com/questions/35758112/find-a-mongodb-document-based-on-element-match-of-a-specific-subtype-type&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsiztj:</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>