<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:58:25 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-1911] $inc should support documents</title>
                <link>https://jira.mongodb.org/browse/SERVER-1911</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If you have nested counters in a document you have always specify the full path to update them.&lt;/p&gt;

&lt;p&gt;update(&lt;/p&gt;
{id:1}
&lt;p&gt;, {&lt;br/&gt;
   &apos;some.path.into1&apos; : 1,&lt;br/&gt;
   &apos;some.path.into2&apos; : 1,&lt;br/&gt;
})&lt;/p&gt;

&lt;p&gt;this quickly becomes quite verbose. Using a document for this would feel natural.&lt;/p&gt;

&lt;p&gt;update(&lt;/p&gt;
{id:1}
&lt;p&gt;, { &apos;$inc&apos;: { &apos;some&apos; : { &apos;path&apos; : &lt;/p&gt;
{
  &apos;into1&apos; : 1,
  &apos;into2&apos; : 1,
}}
&lt;p&gt;}})&lt;/p&gt;

&lt;p&gt;the increment would be on all leaf nodes that are of type int&lt;/p&gt;</description>
                <environment></environment>
        <key id="13291">SERVER-1911</key>
            <summary>$inc should support documents</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="tcurdt">Torsten Curdt</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Oct 2010 13:59:20 +0000</created>
                <updated>Tue, 12 Oct 2010 07:51:02 +0000</updated>
                            <resolved>Fri, 8 Oct 2010 14:00:08 +0000</resolved>
                                    <version>1.7.1</version>
                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="19105" author="tcurdt" created="Tue, 12 Oct 2010 07:51:02 +0000"  >&lt;p&gt;I didn&apos;t want to imply they have the same meaning. I know that.&lt;/p&gt;

&lt;p&gt;All I am saying is that &amp;lt;how to modify&amp;gt; being an object for $inc is not inconsistent. You just need to define the meaning of it.&lt;/p&gt;</comment>
                            <comment id="19081" author="eliot" created="Mon, 11 Oct 2010 23:50:43 +0000"  >&lt;p&gt;The doc has a very different meaning.&lt;br/&gt;
You should make sure to read the modifier page carefully.&lt;/p&gt;

&lt;p&gt;basically,&lt;br/&gt;
$set : { a : &lt;/p&gt;
{ b : 1 }
&lt;p&gt; }&lt;br/&gt;
replaces the a object with &lt;/p&gt;
{ b : 1 }
&lt;p&gt;if it was { a : &lt;/p&gt;
{ b : 1 , c : 1 }
&lt;p&gt; } the c goes away&lt;/p&gt;

&lt;p&gt;$set &lt;/p&gt;
{ &quot;a.b&quot; : 1 }
&lt;p&gt; just changes the b &lt;/p&gt;

&lt;p&gt;so generally&lt;/p&gt;

&lt;p&gt;$&amp;lt;name&amp;gt; : &lt;/p&gt;
{ &amp;lt;what to modify&amp;gt; : &amp;lt;how to modify&amp;gt; }

&lt;p&gt;so &amp;lt;how to moidfy&amp;gt; should not be an object with $inc&lt;/p&gt;</comment>
                            <comment id="19080" author="tcurdt" created="Mon, 11 Oct 2010 22:59:39 +0000"  >&lt;p&gt;$set is not $inc ... and I am not even sure this really is inconsistent. Or for that matter - is consistent like it is right now.&lt;/p&gt;

&lt;p&gt;Right now a document is supported as argument on $set but not on $inc. I would like to see a doc be supported there, too.&lt;br/&gt;
The only thing that needs to be defined is what it means to add a document.&lt;br/&gt;
I would think it&apos;s rather straight forward what the following would do:&lt;/p&gt;

&lt;p&gt;$inc : &lt;/p&gt;
{ &quot;a.b.c.d.e&quot; : 1 }
&lt;p&gt;$inc : { &quot;a.b.c&quot; : { d: &lt;/p&gt;
{ e: 1 }
&lt;p&gt; }&lt;br/&gt;
$inc : { a : { b: { c: { d: &lt;/p&gt;
{ e: 1 }
&lt;p&gt; }&lt;/p&gt;

&lt;p&gt;and it would bring it in line with the $set operator&lt;/p&gt;

&lt;p&gt;$set : &lt;/p&gt;
{ &quot;a.b.c.d.e&quot; : 1 }
&lt;p&gt;$set : { &quot;a.b.c&quot; : { d: &lt;/p&gt;
{ e: 1 }
&lt;p&gt; }&lt;br/&gt;
$set : { a : { b: { c: { d: &lt;/p&gt;
{ e: 1 }
&lt;p&gt; }&lt;/p&gt;</comment>
                            <comment id="19077" author="eliot" created="Mon, 11 Oct 2010 22:26:26 +0000"  >&lt;p&gt;think about $set as well.&lt;br/&gt;
$set : &lt;/p&gt;
{ &quot;a.b.c&quot; : 1 }
&lt;p&gt;is very different than&lt;br/&gt;
$set : { a : { b : &lt;/p&gt;
{ c : 1 }
&lt;p&gt; } }&lt;/p&gt;

&lt;p&gt;and we want consistency&lt;/p&gt;</comment>
                            <comment id="19069" author="tcurdt" created="Mon, 11 Oct 2010 18:39:55 +0000"  >&lt;p&gt;Not sure I really see a problem. It&apos;s actually a document describing how to inc/dec/alter the document in place. This is &quot;inc&quot;, not &quot;find&quot;.&lt;/p&gt;</comment>
                            <comment id="19000" author="eliot" created="Fri, 8 Oct 2010 16:05:42 +0000"  >&lt;p&gt;in queries for example&lt;/p&gt;

&lt;p&gt;{ x : &lt;/p&gt;
{ a : 5 }
&lt;p&gt; } = find a document such that x is a document that is exactly &lt;/p&gt;
{a:5}
{ &quot;x.a&quot; : 5 }
&lt;p&gt; = find a document such that x is a document that has a field a that is 5&lt;/p&gt;</comment>
                            <comment id="18993" author="tcurdt" created="Fri, 8 Oct 2010 15:05:18 +0000"  >&lt;p&gt;Could you please elaborate as I don&apos;t see the semantical problem here.&lt;/p&gt;</comment>
                            <comment id="18991" author="eliot" created="Fri, 8 Oct 2010 14:00:08 +0000"  >&lt;p&gt;This doesn&apos;t work semantically in the query language because documents and dottted fields mean very different things.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 8 Oct 2010 14:00:08 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 19 weeks, 1 day 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@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 19 weeks, 1 day 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>tcurdt</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpdlz:</customfieldvalue>

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

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

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