<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:40:42 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>[COMPASS-5753] JSON editor is the only way to change _id</title>
                <link>https://jira.mongodb.org/browse/COMPASS-5753</link>
                <project id="13182" key="COMPASS">Compass </project>
                    <description>&lt;p&gt;Since &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-4345&quot; title=&quot;Compass does a replace instead of an update when documents are edited.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-4345&quot;&gt;&lt;del&gt;COMPASS-4345&lt;/del&gt;&lt;/a&gt;, Compass uses findOneAndUpdate to modify documents in the document/table views, and findOneAndReplace in the JSON view. That means that only the JSON view supports changing _id, which is not necessarily obvious or intuitive.&lt;/p&gt;

&lt;p&gt;See: &lt;a href=&quot;https://github.com/mongodb-js/compass/issues/2960#issuecomment-1100053941&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/issues/2960#issuecomment-1100053941&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2027807">COMPASS-5753</key>
            <summary>JSON editor is the only way to change _id</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="1" iconUrl="https://jira.mongodb.org/images/icons/statuses/open.png" description="">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="anna.henningsen@mongodb.com">Anna Henningsen</reporter>
                        <labels>
                    </labels>
                <created>Tue, 19 Apr 2022 11:39:26 +0000</created>
                <updated>Tue, 30 Aug 2022 17:00:53 +0000</updated>
                                                                            <component>CRUD</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="4789048" author="xgen-internal-githook" created="Tue, 30 Aug 2022 17:00:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805 (#3239)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: compass-settings&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4685692" author="xgen-internal-githook" created="Mon, 18 Jul 2022 14:22:51 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805 (#3239)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: 1.32-releases&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4679869" author="xgen-internal-githook" created="Thu, 14 Jul 2022 17:12:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805 (#3239)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: update-schema-validation-warnings-to-leafygreen&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4679254" author="xgen-internal-githook" created="Thu, 14 Jul 2022 14:18:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805 (#3239)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: compass-sidebar-merge&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4677747" author="xgen-internal-githook" created="Wed, 13 Jul 2022 20:15:56 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805 (#3239)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5673&quot; title=&quot;Update Query Bar to Leafy Green, implement new designs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5673&quot;&gt;&lt;del&gt;COMPASS-5673&lt;/del&gt;&lt;/a&gt;-query-bar&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4676586" author="xgen-internal-githook" created="Wed, 13 Jul 2022 14:21:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805 (#3239)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5672&quot; title=&quot;Update CRUD toolbar to Leafy Green&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5672&quot;&gt;&lt;del&gt;COMPASS-5672&lt;/del&gt;&lt;/a&gt;-update-crud-toolbar-to-lg&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4676526" author="xgen-internal-githook" created="Wed, 13 Jul 2022 14:05:10 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805 (#3239)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5677&quot; title=&quot;Update Query History toolbar to Leafy Green&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5677&quot;&gt;&lt;del&gt;COMPASS-5677&lt;/del&gt;&lt;/a&gt;-update-query-history-toolbar&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4676255" author="xgen-internal-githook" created="Wed, 13 Jul 2022 11:43:48 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805 (#3239)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5946&quot; title=&quot;Use Leafy Green Select and Combobox components&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5946&quot;&gt;&lt;del&gt;COMPASS-5946&lt;/del&gt;&lt;/a&gt;-leafy-green-select-and-combobox&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4676035" author="xgen-internal-githook" created="Wed, 13 Jul 2022 09:29:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805 (#3239)&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: main&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/c865b66bd7c443da8f9d6ab9815aabf98175d8b5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4670282" author="xgen-internal-githook" created="Mon, 11 Jul 2022 13:12:02 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, there is an&lt;br/&gt;
    upcoming server sharding project will hopefully already have&lt;br/&gt;
    made inclusion of the shard keys unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: 5805-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/029c55f74c5e411558faf9f15e955d4c769fe905&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/029c55f74c5e411558faf9f15e955d4c769fe905&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4670258" author="xgen-internal-githook" created="Mon, 11 Jul 2022 13:00:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Anna Henningsen&apos;, &apos;email&apos;: &apos;anna.henningsen@mongodb.com&apos;, &apos;username&apos;: &apos;addaleax&apos;}
&lt;p&gt;Message: feat(hadron-document)!: handle nested fields and dots &amp;amp; dollars well COMPASS-5805&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Instead of fully replacing top-level properties only when editing&lt;br/&gt;
  documents, set only the individual nested values that have been&lt;br/&gt;
  edited.&lt;/li&gt;
	&lt;li&gt;This does not apply to array item removals, since there is no&lt;br/&gt;
    way to perform this (at least in MongoDB 4.0, but doing so&lt;br/&gt;
    on newer versions is also not straightforward).&lt;/li&gt;
	&lt;li&gt;Use `$getField` and `$setField` to modify fields whose names&lt;br/&gt;
    contain dots or start with a dollar sign.&lt;br/&gt;
    This is kind of a breaking change in that, previously, we&lt;br/&gt;
    would have queried for the field names containing dots,&lt;br/&gt;
    the server would have interpreted the field name as referring&lt;br/&gt;
    to nested documents, almost never found a document matching that&lt;br/&gt;
    (unless the doc happened to have a shape like&lt;br/&gt;
    `
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: { x}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;` with matching values), and we then&lt;br/&gt;
    prompted the user to force-update due to the assumption that&lt;br/&gt;
    no document having been found means that it has been updated&lt;br/&gt;
    in the background.&lt;br/&gt;
    After this change, we just inform users that doing this&lt;br/&gt;
    properly requires MongoDB 5.0 or above. Users can still perform&lt;br/&gt;
    edits through the JSON view, at least for now (potentially only&lt;br/&gt;
    until &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5753&quot; title=&quot;JSON editor is the only way to change _id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5753&quot;&gt;COMPASS-5753&lt;/a&gt; is done).&lt;/p&gt;&lt;/li&gt;
	&lt;li&gt;Split the query/update document generation parts into two steps,&lt;br/&gt;
  and move these out of the `Document` class to `ObjectGenerator`&lt;br/&gt;
  (which is already a collection of static methods for recursively&lt;br/&gt;
  traversing a document/element tree).&lt;/li&gt;
	&lt;li&gt;In the first step, gather all the elements that were updated,&lt;br/&gt;
    their original paths and values and their new paths and values.&lt;/li&gt;
	&lt;li&gt;In the second step, build either a query out of those original&lt;br/&gt;
    paths and values, or build the update document out of the new&lt;br/&gt;
    paths and values.&lt;/li&gt;
	&lt;li&gt;Drive-by bugfixes:&lt;/li&gt;
	&lt;li&gt;When renaming elements, we previously did not check that the&lt;br/&gt;
    new name was not already added in the background. We check&lt;br/&gt;
    this as well now.&lt;/li&gt;
	&lt;li&gt;Handle the case in which elements are renamed circularly,&lt;br/&gt;
    e.g. key2 &#8594; key3, key1 &#8594; key2 (or similar add/remove situations).&lt;/li&gt;
	&lt;li&gt;Use string arrays instead of objects that are only being used&lt;br/&gt;
  to extract their keys in the hadron-document API for hopefully&lt;br/&gt;
  a bit more API clarity.&lt;/li&gt;
	&lt;li&gt;Clarify in the docs that dots inside field names refer to&lt;br/&gt;
    nested documents. This is the way that sharding behaves,&lt;br/&gt;
    which is why we use them in the first place, and is not&lt;br/&gt;
    a practical API to break. (And if it does, PM-1632 will&lt;br/&gt;
    hopefully already have made inclusion of the shard keys&lt;br/&gt;
    unnecessary.)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This also addresses &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-5528&quot; title=&quot;Compass replaces whole array if you update one field in an array of objects&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-5528&quot;&gt;&lt;del&gt;COMPASS-5528&lt;/del&gt;&lt;/a&gt; (which is about adjusting the&lt;br/&gt;
update document sent to the server, whereas COMPASS-5805 is about&lt;br/&gt;
adjusting the query document).&lt;br/&gt;
Branch: 5805-dev&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb-js/compass/commit/148cc77f498c5d2ea02d5682451c90d5d3aeece7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb-js/compass/commit/148cc77f498c5d2ea02d5682451c90d5d3aeece7&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1987228">COMPASS-5528</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="1404071">COMPASS-4345</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 11 Jul 2022 13:00:39 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 23 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>xgen-internal-githook</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 23 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>anna.henningsen@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0ro3z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr1nvg:8r</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>
                                                                                                                                                                                                                                        <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="6308">Iteration Eel</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0ra9b:</customfieldvalue>

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