<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:53:17 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-181] $set with array indexes</title>
                <link>https://jira.mongodb.org/browse/SERVER-181</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;fcoury@imac 17:47&amp;#93;&lt;/span&gt;:$ mongo&lt;br/&gt;
MongoDB shell version: 0.9.6&lt;br/&gt;
url: test&lt;br/&gt;
connecting to: test&lt;br/&gt;
type &quot;help&quot; for help&lt;br/&gt;
&amp;gt; db.sample.remove();&lt;br/&gt;
&amp;gt; db.sample.save({&quot;_id&quot; : &quot;db1940364a68bbca000000a1&quot; , &quot;test&quot; : [&lt;/p&gt;
{&quot;name&quot; : &quot;domain&quot; , &quot;default&quot; : &quot;&quot; , &quot;validation&quot; : &quot;&quot; , &quot;validation_error&quot; : &quot;&quot; , &quot;label&quot; : &quot;Domain&quot; , &quot;required&quot; : false}
&lt;p&gt;]})&lt;br/&gt;
&amp;gt; db.sample.update(&lt;/p&gt;
{&quot;_id&quot;:&quot;db1940364a68bbca000000a1&quot;}
&lt;p&gt;, {$set: {&quot;test.0.new_attribute&quot;: &quot;new_value&quot;}}) &lt;br/&gt;
&amp;gt; db.sample.find();     &lt;br/&gt;
{&quot;_id&quot; : &quot;db1940364a68bbca000000a1&quot; , &quot;test&quot; : [&lt;/p&gt;
{&quot;name&quot; : &quot;domain&quot; , &quot;default&quot; : &quot;&quot; , &quot;validation&quot; : &quot;&quot; , &quot;validation_error&quot; : &quot;&quot; , &quot;label&quot; : &quot;Domain&quot; , &quot;required&quot; : false}
&lt;p&gt;]}&lt;/p&gt;</description>
                <environment></environment>
        <key id="10347">SERVER-181</key>
            <summary>$set with array indexes</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="eliot">Eliot Horowitz</reporter>
                        <labels>
                    </labels>
                <created>Thu, 23 Jul 2009 16:54:44 +0000</created>
                <updated>Tue, 12 Jul 2016 00:28:10 +0000</updated>
                            <resolved>Fri, 18 Dec 2009 17:28:52 +0000</resolved>
                                                    <fixVersion>1.3.0</fixVersion>
                                    <component>Write Ops</component>
                                        <votes>6</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="11519" author="auto" created="Mon, 28 Dec 2009 15:45:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: more tests for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-181&quot; title=&quot;$set with array indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-181&quot;&gt;&lt;del&gt;SERVER-181&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/95137f262c2a57831dccf058428a2f64e900496e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/95137f262c2a57831dccf058428a2f64e900496e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="11422" author="auto" created="Fri, 18 Dec 2009 17:28:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: tests and minor fixes for &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-181&quot; title=&quot;$set with array indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-181&quot;&gt;&lt;del&gt;SERVER-181&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-273&quot; title=&quot;$unset with array indices&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-273&quot;&gt;&lt;del&gt;SERVER-273&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/da08edb63dc7ba51a236608f9288b4bef969db1a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/da08edb63dc7ba51a236608f9288b4bef969db1a&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="10899" author="eliot" created="Fri, 16 Oct 2009 07:46:04 +0000"  >&lt;p&gt;I created the following document (notebook):&lt;br/&gt;
notebook = {&lt;br/&gt;
       &quot;code&quot; : &quot;456&quot;,&lt;br/&gt;
       &quot;notes&quot; : [&lt;br/&gt;
       &lt;/p&gt;
{ &quot;id&quot; : 4,
               &quot;name&quot; : &quot;Graphics Note&quot;,
               &quot;tags&quot; : [ &quot;graphics&quot;, &quot;coding&quot;, &quot;maths&quot; ],
       }
&lt;p&gt;,&lt;br/&gt;
       &lt;/p&gt;
{       &quot;id&quot; : 5,
               &quot;name&quot; : &quot;Food Note&quot;,
               &quot;tags&quot; : [ &quot;pizza&quot;, &quot;coke&quot;, &quot;movie&quot; ],
       }
&lt;p&gt;,&lt;br/&gt;
               ]&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;Notebook contains a list of collections (called notes). Now, after&lt;br/&gt;
lots of googling I read that a field of an individual note, in this&lt;br/&gt;
case, should be updated as follows:&lt;br/&gt;
db&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;notebooks&amp;quot;&amp;#93;&lt;/span&gt;.update( &lt;/p&gt;
{ &quot;code&quot;:&quot;456&quot;, &quot;notes.id&quot;:4 }
&lt;p&gt;, &lt;/p&gt;
{ &quot;$set&quot; :
{ &quot;notes.0.id&quot; : 3 }
&lt;p&gt; }, safe=True);&lt;/p&gt;

&lt;p&gt;But, if I try to do this:&lt;br/&gt;
db&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;notebooks&amp;quot;&amp;#93;&lt;/span&gt;.update( &lt;/p&gt;
{ &quot;code&quot;:&quot;456&quot;, &quot;notes.id&quot;:4 }
&lt;p&gt;, &lt;/p&gt;
{ &quot;$set&quot; :
{ &quot;notes.0.name&quot; : &quot;Cool Graphics Note&quot; }
&lt;p&gt; }, safe=True);&lt;br/&gt;
it fails with this message: &quot;Modifier spec implies existence of an&lt;br/&gt;
encapsulating object with a name that already represents a non-object,&lt;br/&gt;
or is referenced in another $set clause&quot;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="10692">SERVER-333</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 18 Dec 2009 17:28:48 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        14 years, 8 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            14 years, 8 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpx6v:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23660</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|hsijxj:</customfieldvalue>

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