<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:12:12 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>[SERVER-6614] When matching multiple items in inner collections / document arrays, selecting with { &apos;innerCollection.$&apos; : 1 } only returns the lastest of the matched element. </title>
                <link>https://jira.mongodb.org/browse/SERVER-6614</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When matching multiple items in inner collections / document arrays, selecting with &lt;/p&gt;
{ &apos;innerCollection.$&apos; : 1 }
&lt;p&gt; only returns one of the matched element.&lt;/p&gt;

&lt;p&gt;e.g.: &lt;br/&gt;
Doing &lt;/p&gt;

&lt;p&gt;&amp;gt; db.testCollection.insert({ name : &apos;Albert&apos;, innerCollection : [&lt;/p&gt;
{memberId: &apos;red&apos;}
&lt;p&gt;, &lt;/p&gt;
{memberId : &apos;green&apos;}
&lt;p&gt; ] })&lt;br/&gt;
&amp;gt; db.testCollection.insert({ name : &apos;Beatrice&apos;, innerCollection : [&lt;/p&gt;
{memberId: &apos;red&apos;}
&lt;p&gt;, &lt;/p&gt;
{memberId : &apos;blue&apos;}
&lt;p&gt; ] })&lt;br/&gt;
&amp;gt; db.testCollection.insert({ name : &apos;Carl&apos;, innerCollection : [&lt;/p&gt;
{memberId: &apos;green&apos;}
&lt;p&gt;, &lt;/p&gt;
{memberId : &apos;blue&apos;}
&lt;p&gt; ] })&lt;/p&gt;

&lt;p&gt;&amp;gt; db.testCollection.find({ $and : [&lt;/p&gt;
{&apos;innerCollection.memberId&apos; : &apos;blue&apos;}
&lt;p&gt;, &lt;/p&gt;
{&apos;innerCollection.memberId&apos; : &apos;red&apos;}
&lt;p&gt;]}, &lt;/p&gt;
{&apos;innerCollection.$&apos; : 1}
&lt;p&gt;)&lt;br/&gt;
{ &quot;_id&quot; : ObjectId(&quot;5011c44a5748f01ae71d50d7&quot;), &quot;innerCollection&quot; : [ &lt;/p&gt;
{ &quot;memberId&quot; : &quot;red&quot; }
&lt;p&gt; ] }&lt;/p&gt;

&lt;p&gt;properly finds the requested documents, but the innerCollection item only returns the element matching &lt;/p&gt;
{ &apos;innerCollection.memberId&apos; : &apos;red&apos; }
&lt;p&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="45488">SERVER-6614</key>
            <summary>When matching multiple items in inner collections / document arrays, selecting with { &apos;innerCollection.$&apos; : 1 } only returns the lastest of the matched element. </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="benjamin.becker">Ben Becker</assignee>
                                    <reporter username="glesperance">Gabriel Lesperance</reporter>
                        <labels>
                    </labels>
                <created>Thu, 26 Jul 2012 22:31:06 +0000</created>
                <updated>Wed, 11 Jan 2023 20:37:54 +0000</updated>
                            <resolved>Tue, 21 Aug 2012 21:19:35 +0000</resolved>
                                    <version>2.2.0-rc0</version>
                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="5106372" author="xgen-internal-githook" created="Wed, 11 Jan 2023 16:14:31 +0000"  >&lt;p&gt;&lt;b&gt;(Sorry for this wrong commit message posted here. Server ticket attached to this commit message is wrong. Please refer &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-66146&quot; title=&quot;Make in-memory changes for system.views in a transactional way for shard merge protocol&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-66146&quot;&gt;&lt;del&gt;SERVER-66146&lt;/del&gt;&lt;/a&gt; for &quot;Make in-memory changes to system.views collection transactional.&quot;)&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;Author: {&apos;name&apos;: &apos;Suganthi Mani&apos;, &apos;email&apos;: &apos;suganthi.mani@mongodb.com&apos;, &apos;username&apos;: &apos;smani87&apos;}&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6614&quot; title=&quot;When matching multiple items in inner collections / document arrays, selecting with { &amp;#39;innerCollection.$&amp;#39; : 1 } only returns the lastest of the matched element. &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6614&quot;&gt;&lt;del&gt;SERVER-6614&lt;/del&gt;&lt;/a&gt; Make in-memory changes to system.views collection transactional.&lt;/del&gt;&lt;br/&gt;
&lt;del&gt;Branch: master&lt;/del&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/bf9163b47cbaf51332374d559d2c0a46f7f1098a-&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;del&gt;https://github.com/mongodb/mongo/commit/bf9163b47cbaf51332374d559d2c0a46f7f1098a&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="11774">SERVER-1013</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 16 Aug 2012 17:19:34 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 4 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></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_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>xgen-internal-githook</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 4 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>benjamin.becker</customfieldvalue>
            <customfieldvalue>glesperance</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnts7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrgnav:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10730</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht07lr:</customfieldvalue>

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