<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:07 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>[CSHARP-531] Support the $ positional operator when building a query for updating a collection</title>
                <link>https://jira.mongodb.org/browse/CSHARP-531</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;The feature to add strongly typed LINQ support to the builders doesn&apos;t suppport updating of nested collections.&lt;/p&gt;

&lt;p&gt;For example, it&apos;s possible to write an update like:&lt;/p&gt;

&lt;p&gt;statusCollection.Update(&lt;br/&gt;
	Query&amp;lt;StatusGroup&amp;gt;.Where(sg =&amp;gt; sg.Statuses.Any(s =&amp;gt; s.Id == status.Id)),&lt;br/&gt;
        Update.Set(&quot;Statuses.$.UpdateTime&quot;, DateTime.Now)&lt;br/&gt;
        	.Set(&quot;Statuses.$.Name&quot;, &quot;name&quot;)&lt;br/&gt;
);&lt;/p&gt;

&lt;p&gt;It would be nice if it was possible to write something like:&lt;/p&gt;

&lt;p&gt;statusCollection.Update(&lt;br/&gt;
	Query&amp;lt;StatusGroup&amp;gt;.Where(sg =&amp;gt; sg.Statuses.Any(s =&amp;gt; s.Id == status.Id)),&lt;br/&gt;
        Update&amp;lt;StatusGroup, Status&amp;gt;.Set(sg =&amp;gt; sg.Statuses, s =&amp;gt; s.UpdateTime, DateTime.Now)&lt;br/&gt;
        	.Set(sg =&amp;gt; sg.Statuses, s =&amp;gt; s.Name, &quot;name&quot;)&lt;br/&gt;
);&lt;/p&gt;

&lt;p&gt;Eventually it would be nice to support multi-level nested collections but that might be dependant on &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-831&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-831&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="44675">CSHARP-531</key>
            <summary>Support the $ positional operator when building a query for updating a collection</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="-1">Unassigned</assignee>
                                    <reporter username="sebm">Seb Michaud</reporter>
                        <labels>
                            <label>driver</label>
                    </labels>
                <created>Wed, 18 Jul 2012 14:30:05 +0000</created>
                <updated>Fri, 30 Mar 2018 10:35:47 +0000</updated>
                            <resolved>Mon, 9 Mar 2015 19:36:21 +0000</resolved>
                                    <version>1.5</version>
                                    <fixVersion>2.0</fixVersion>
                                    <component>Feature Request</component>
                                        <votes>18</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="1849965" author="sami" created="Fri, 30 Mar 2018 10:35:47 +0000"  >&lt;p&gt;Do you plan to add support for the  $[ ] array operator?&lt;/p&gt;</comment>
                            <comment id="846770" author="craiggwilson" created="Mon, 9 Mar 2015 19:39:45 +0000"  >&lt;p&gt;This is only applicable to the new API in 2.0.0. -1 can be used as an indexer or with GetElementAt to indicate to us to use the positional operator.  For example:&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;Builders&amp;lt;Entity&amp;gt;.Update.Set(x =&amp;gt; x.MyArray[-1].Value, 10);&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;// will yield {$set: { &quot;MyArray.$.Value&quot;, 10 } }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="846760" author="craiggwilson" created="Mon, 9 Mar 2015 19:36:10 +0000"  >&lt;p&gt;Git commit: &lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/ecbd337d0a0f8cf63258251de75425f99277a97b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/ecbd337d0a0f8cf63258251de75425f99277a97b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="793552" author="fras" created="Wed, 24 Dec 2014 06:41:15 +0000"  >&lt;p&gt;yes , this is one of the most important points , because every change in fields name must be easily detected during compile time&lt;/p&gt;

&lt;p&gt;thanks for MongoDB staff&lt;/p&gt;</comment>
                            <comment id="386176" author="craiggwilson" created="Mon, 22 Jul 2013 13:23:39 +0000"  >&lt;p&gt;We have not begun this feature.  If it is important to you, please vote it up.&lt;/p&gt;</comment>
                            <comment id="385976" author="david@funnelfire.com" created="Mon, 22 Jul 2013 02:54:22 +0000"  >&lt;p&gt;Just wondering - any progress on this issue? Hit into this problem today.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="52282">CSHARP-588</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="154069">CSHARP-1046</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </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|hs0t8v:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>129178</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>