<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:12:06 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-46670] Document the behavior when projection includes fields &quot;a&quot; and &quot;a.b&quot;</title>
                <link>https://jira.mongodb.org/browse/SERVER-46670</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We found out that when projection includes &quot;a&quot; and &quot;a.b&quot;, that is, parent and child document are both in the projection, the order in BSON Document is prominent.&#160; For example:&lt;/p&gt;

&lt;p&gt;These two are equivalent:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;db.document.find({}, {&quot;a.b&quot;:1, &quot;a&quot;:1})&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;db.document.find({}, {&quot;a&quot;:1})&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;and these two:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;db.document.find({}, {&quot;a&quot;:1, &quot;a.b&quot;:1})&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;db.document.find({}, {&quot;b&quot;:1})&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;I am wondering whether it is undocumented behavior, or it should be able to include the parent document regardless of the order.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1235735">SERVER-46670</key>
            <summary>Document the behavior when projection includes fields &quot;a&quot; and &quot;a.b&quot;</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="ian.boros@mongodb.com">Ian Boros</assignee>
                                    <reporter username="mwei">Yao Wei</reporter>
                        <labels>
                            <label>qexec-team</label>
                    </labels>
                <created>Fri, 6 Mar 2020 02:42:58 +0000</created>
                <updated>Mon, 9 Mar 2020 21:16:51 +0000</updated>
                            <resolved>Mon, 9 Mar 2020 21:16:51 +0000</resolved>
                                    <version>4.0.14</version>
                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2955668" author="ian.boros" created="Mon, 9 Mar 2020 21:16:37 +0000"  >&lt;p&gt;Hello &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=mwei&quot; class=&quot;user-hover&quot; rel=&quot;mwei&quot;&gt;mwei&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I believe this is more or less a duplicate of&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6527&quot; title=&quot;in projection implementation, dotted field inclusion supersedes parent field inclusion&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6527&quot;&gt;&lt;del&gt;SERVER-6527&lt;/del&gt;&lt;/a&gt;. You are absolutely right that this behavior is strange (and undesirable). Fortunately, this problem has been fixed in master, so versions of mongo 4.4 and later will report an error when any paths which overlap with one another are projected.&lt;/p&gt;

&lt;p&gt;Feel free to comment here if you have any questions! I will close this ticket as a duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6527&quot; title=&quot;in projection implementation, dotted field inclusion supersedes parent field inclusion&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6527&quot;&gt;&lt;del&gt;SERVER-6527&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;IB&lt;/p&gt;</comment>
                            <comment id="2947794" author="mwei" created="Fri, 6 Mar 2020 06:32:56 +0000"  >&lt;p&gt;Correction on the descriptions. These two are equivalent, instead of the latter two in the issue description:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;db.document.find({}, {&quot;a&quot;:1, &quot;a.b&quot;:1})&lt;/tt&gt;&lt;br/&gt;
 &lt;tt&gt;db.document.find({}, {&quot;a.b&quot;:1})&lt;/tt&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="44857">SERVER-6527</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</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>Mon, 9 Mar 2020 21:16:37 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 48 weeks, 2 days 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>ian.boros@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 48 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>ian.boros@mongodb.com</customfieldvalue>
            <customfieldvalue>mwei</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hx23p3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwpyuv:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="3496">Query 2020-03-23</customfieldvalue>

                        </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|hx1pyf:</customfieldvalue>

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