<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:16 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-588] Strong typed generic functions for inner document updates </title>
                <link>https://jira.mongodb.org/browse/CSHARP-588</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Hi &lt;br/&gt;
I&apos;ve tried to perform an update of embedded document using new generic syntax, but didn&apos;t find any solution (only adding and deleting embedded documents in collections). I meen code like this:&lt;/p&gt;

&lt;p&gt; MongoCollection.Update(&lt;br/&gt;
                Query.And(Query&amp;lt;ReadDto.Concert&amp;gt;.EQ(ev =&amp;gt; ev.Id, evnt.AggregateId),&lt;br/&gt;
                          Query&amp;lt;ReadDto.Concert&amp;gt;.ElemMatch(item =&amp;gt; item.LineupItems,&lt;br/&gt;
                                                           builder =&amp;gt;&lt;br/&gt;
                                                           builder.EQ(&lt;br/&gt;
                                                               item =&amp;gt; item.ArtistId,&lt;br/&gt;
                                                               evnt.EntityObjectId))),&lt;br/&gt;
                Update.Set(&quot;LineupItems.$.Headliner&quot;, evnt.Headliner)&lt;br/&gt;
                    .Set(&quot;ChangeDate&quot;, evnt.ChangeDate)&lt;br/&gt;
                    .Set(&quot;Version&quot;, evnt.Version));&lt;/p&gt;

&lt;p&gt;Is it possible to construct such update using Update&amp;lt;&amp;gt;? And also it&apos;s not clear how to perform an update of embedded document which is single. &lt;/p&gt;</description>
                <environment></environment>
        <key id="52282">CSHARP-588</key>
            <summary>Strong typed generic functions for inner document updates </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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="nsushkov">Nikita Sushkov</reporter>
                        <labels>
                            <label>driver</label>
                            <label>update</label>
                    </labels>
                <created>Thu, 4 Oct 2012 09:27:02 +0000</created>
                <updated>Thu, 20 Mar 2014 16:39:22 +0000</updated>
                            <resolved>Wed, 13 Mar 2013 14:46:27 +0000</resolved>
                                    <version>1.6</version>
                                                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="171339" author="craiggwilson" created="Thu, 4 Oct 2012 13:04:47 +0000"  >&lt;p&gt;We are still working out how to get the $ syntax to work in a typed situation.  It&apos;s a very difficult problem and you are stuck using strings right now when needing the $ positional operator.  TFor the other properties, &quot;ChangeDate&quot; and &quot;Version&quot;, you can use the typed version and combine it with the non-typed version using the combine method.&lt;/p&gt;

&lt;p&gt;var update = Update.Combine(&lt;br/&gt;
  Update.Set(&quot;LineupItems.$.Headliner&quot;, evnt.Headliner),&lt;br/&gt;
  Update&amp;lt;ReadDto.Concert&amp;gt;.Set(v =&amp;gt; v.ChangeDate, evnt.ChangeDate),&lt;br/&gt;
  Update&amp;lt;ReadDto.Concert&amp;gt;.Set(v =&amp;gt; v.Version, evnt.Version));&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="44675">CSHARP-531</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|hrjq3z:</customfieldvalue>

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