<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:39:50 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>[GODRIVER-2999] Implemente ReplaceByID</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-2999</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;Replicate how UpdateByID works&lt;/p&gt;</description>
                <environment></environment>
        <key id="2455402">GODRIVER-2999</key>
            <summary>Implemente ReplaceByID</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="12300">Won&apos;t Do</resolution>
                                        <assignee username="preston.vasquez@mongodb.com">Preston Vasquez</assignee>
                                    <reporter username="tomas.warynyca@outlook.com">Tom&#225;s Warynyca</reporter>
                        <labels>
                    </labels>
                <created>Sat, 30 Sep 2023 15:55:47 +0000</created>
                <updated>Wed, 11 Oct 2023 21:28:40 +0000</updated>
                            <resolved>Thu, 5 Oct 2023 20:23:51 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="5771903" author="JIRAUSER1259527" created="Wed, 11 Oct 2023 21:28:40 +0000"  >&lt;p&gt;Adding more context to the decision to not add &lt;tt&gt;ReplaceByID&lt;/tt&gt;:&lt;br/&gt;
We recognize that having to redefine the same filter over and over can be tedious and adds an opportunity to introduce typos. However, adding &lt;tt&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;operation&amp;#93;&lt;/span&gt;ByID&lt;/tt&gt; methods for all of the frequently used operation methods is not a sustainable pattern. Instead, we are experimenting with a query filter helper to make writing filters easier and safer and that can work with any operation function. See &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-3012&quot; title=&quot;Create a CRUD query filters helper&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-3012&quot;&gt;GODRIVER-3012&lt;/a&gt; for more detail.&lt;/p&gt;</comment>
                            <comment id="5756939" author="JIRAUSER1265158" created="Thu, 5 Oct 2023 20:06:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tomas.warynyca%40outlook.com&quot; class=&quot;user-hover&quot; rel=&quot;tomas.warynyca@outlook.com&quot;&gt;tomas.warynyca@outlook.com&lt;/a&gt; We are likely going to deprecate &lt;tt&gt;UpdateByID&lt;/tt&gt; in V2. The reason for such convenience functions are unclear, as it is straight-forward for a user to wrap existing collection methods for reuse. The same would apply to requests for additional convenience functions like &lt;tt&gt;FindByID&lt;/tt&gt; or &lt;tt&gt;ReplaceByID&lt;/tt&gt;:&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;func replaceByID(id interface{}) {&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;    filter := bson.D{{Key: &quot;_id&quot;, Value: b.ID}}&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;    _, _ := db.MongoInstance.Function().ReplaceOne(ctx, filter, b)&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;}&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="5756751" author="tomas.warynyca@outlook.com" created="Thu, 5 Oct 2023 19:08:03 +0000"  >&lt;p&gt;Good afternoon, instead of having to be adding the filter all the time when I have to replace by ID in different saving methods that I have&lt;br/&gt;
It would work like UpdateByID does, it receives the ID as a parameter and internally adds the filter.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Current&lt;/b&gt;&lt;br/&gt;
filter := bson.D{{Key: &quot;_id&quot;, Value: b.ID}}&lt;br/&gt;
_, _ := db.MongoInstance.Function().ReplaceOne(ctx, filter, b)&lt;/p&gt;

&lt;p&gt;&lt;b&gt;New&lt;/b&gt;&lt;br/&gt;
_, _ := db.MongoInstance.Function().ReplaceByID(ctx, b.ID, b)&lt;/p&gt;</comment>
                            <comment id="5756649" author="JIRAUSER1265158" created="Thu, 5 Oct 2023 18:41:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tomas.warynyca%40outlook.com&quot; class=&quot;user-hover&quot; rel=&quot;tomas.warynyca@outlook.com&quot;&gt;tomas.warynyca@outlook.com&lt;/a&gt; Thanks for the ticket! Would you mind sharing your use-case for this?&lt;/p&gt;</comment>
                            <comment id="5743155" author="dbeng-pm-bot" created="Sat, 30 Sep 2023 15:55:50 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=tomas.warynyca%40outlook.com&quot; class=&quot;user-hover&quot; rel=&quot;tomas.warynyca@outlook.com&quot;&gt;tomas.warynyca@outlook.com&lt;/a&gt;, thank you for reporting this issue! The team will look into it and get back to you soon. &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="2472091">GODRIVER-3012</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="1565881">GODRIVER-1807</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

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

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