<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:09:33 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>[CDRIVER-457] Allow DBRef object notation for embedded documents</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-457</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;The C driver currently considers DBRef objects invalid due to &lt;tt&gt;$&lt;/tt&gt;-prefixing of their &lt;tt&gt;$ref&lt;/tt&gt;, &lt;tt&gt;$id&lt;/tt&gt;, and optional &lt;tt&gt;$db&lt;/tt&gt; field names. All of the following embedded document values should past validation:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;$ref&quot;: &amp;lt;string&amp;gt;, &quot;$id&quot;: &amp;lt;anything&amp;gt; }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;$ref&quot;: &amp;lt;string&amp;gt;, &quot;$id&quot;: &amp;lt;anything&amp;gt;, &quot;$db&quot;: &amp;lt;string&amp;gt; }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;$ref&quot;: &amp;lt;string&amp;gt;, &quot;$id&quot;: &amp;lt;anything&amp;gt;, &quot;foo&quot;: &amp;lt;anything&amp;gt; }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ &quot;$ref&quot;: &amp;lt;string&amp;gt;, &quot;$id&quot;: &amp;lt;anything&amp;gt;, &quot;$db&quot;: &amp;lt;string&amp;gt;, &quot;foo&quot;: &amp;lt;anything&amp;gt; }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;The last two examples may appear strange, but because DBRefs are simply embedded documents, they are permitted to contain additional fields (without &lt;tt&gt;$&lt;/tt&gt; prefixes, of course). Various ODMs take advantage of this to store additional metadata about references, such as the referenced document&apos;s class name.&lt;/p&gt;

&lt;p&gt;So, the general rule about DBRefs is:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;They&apos;re embedded objects. A top-level document cannot be a DBRef, even if &lt;tt&gt;_id&lt;/tt&gt; was to appear after &lt;tt&gt;$ref&lt;/tt&gt; and &lt;tt&gt;$id&lt;/tt&gt; in the BSON document field sequence.&lt;/li&gt;
	&lt;li&gt;They require &lt;tt&gt;$ref&lt;/tt&gt; and &lt;tt&gt;$id&lt;/tt&gt; as the first and second fields, respectively.&lt;/li&gt;
	&lt;li&gt;An optional &lt;tt&gt;$db&lt;/tt&gt; field is permitted only as the third field.&lt;/li&gt;
	&lt;li&gt;Additional fields may appear in after &lt;tt&gt;$id&lt;/tt&gt; (if there is no &lt;tt&gt;$db&lt;/tt&gt;) or &lt;tt&gt;$db&lt;/tt&gt;, but they cannot have &lt;tt&gt;$&lt;/tt&gt; prefixes.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;As a result of DBRef object notation not being valid (due to &lt;tt&gt;$&lt;/tt&gt; prefixes on its field names), users may be wrongfully encouraged to create DBPointer BSON types, which have been deprecated for many years.&lt;/p&gt;</description>
                <environment></environment>
        <key id="167572">CDRIVER-457</key>
            <summary>Allow DBRef object notation for embedded documents</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="mira.carey@mongodb.com">Mira Carey</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Nov 2014 22:28:32 +0000</created>
                <updated>Wed, 3 May 2017 22:14:37 +0000</updated>
                            <resolved>Thu, 6 Nov 2014 22:21:07 +0000</resolved>
                                    <version> 1.0.2 </version>
                                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="757373" author="jason.carey" created="Thu, 6 Nov 2014 00:03:30 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/libbson/pull/109&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/pull/109&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="757284" author="jmikola@gmail.com" created="Wed, 5 Nov 2014 22:37:30 +0000"  >&lt;p&gt;With &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-9790&quot; title=&quot;DBRef string representation should include $db&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-9790&quot;&gt;&lt;del&gt;SERVER-9790&lt;/del&gt;&lt;/a&gt;, MongoDB 2.8 will now render the &lt;tt&gt;$db&lt;/tt&gt; value in the shell; however, additional fields are still not rendered (I believe that is being tracked by &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-10777&quot; title=&quot;Allow JSON Parser to support additional fields when parsing DBRefs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-10777&quot;&gt;&lt;del&gt;SERVER-10777&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;</comment>
                            <comment id="757278" author="jmikola@gmail.com" created="Wed, 5 Nov 2014 22:29:50 +0000"  >&lt;p&gt;See PHP-1262 and related discussion for how this issue affected the MongoHub OSX application: &lt;a href=&quot;https://github.com/jeromelebel/MongoHub-Mac/issues/148&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/jeromelebel/MongoHub-Mac/issues/148&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="90004">SERVER-10777</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="11266">SERVER-612</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="76776">SERVER-9790</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs3pbb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>146478</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="304">C Sprint 9</customfieldvalue>

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