<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:58: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>[JAVA-2810] Allow dots and $ in field names</title>
                <link>https://jira.mongodb.org/browse/JAVA-2810</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;MongoDB 3.6 allows using dots and dollar signs in the field names.&lt;br/&gt;
&lt;a href=&quot;https://docs.mongodb.com/manual/reference/limits/#Restrictions-on-Field-Names&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/limits/#Restrictions-on-Field-Names&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please remove this restriction from &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/blob/master/driver-core/src/main/com/mongodb/internal/validator/CollectibleDocumentFieldNameValidator.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;CollectibleDocumentFieldNameValidator&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="511341">JAVA-2810</key>
            <summary>Allow dots and $ in field names</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="2">Won&apos;t Fix</resolution>
                                        <assignee username="scott.lhommedieu@mongodb.com">Scott L&apos;Hommedieu</assignee>
                                    <reporter username="wajda">Alex Vayda</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 Mar 2018 18:23:00 +0000</created>
                <updated>Sun, 27 Oct 2019 17:39:15 +0000</updated>
                            <resolved>Tue, 12 Mar 2019 22:23:30 +0000</resolved>
                                                                    <component>Command Operations</component>
                                        <votes>7</votes>
                                    <watches>14</watches>
                                                                                                                <comments>
                            <comment id="2179483" author="ozma" created="Wed, 13 Mar 2019 14:37:40 +0000"  >&lt;p&gt;Thank you&#160;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=scott.lhommedieu&quot; class=&quot;user-hover&quot; rel=&quot;scott.lhommedieu&quot;&gt;scott.lhommedieu&lt;/a&gt;&#160;for the workaround&lt;/p&gt;</comment>
                            <comment id="2179063" author="scott.lhommedieu" created="Tue, 12 Mar 2019 22:23:30 +0000"  >&lt;p&gt;We&apos;ll deal with this in&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-618&quot; title=&quot;Add escaping convention for dot and dollar signs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-618&quot;&gt;&lt;del&gt;DRIVERS-618&lt;/del&gt;&lt;/a&gt;.&#160; For the time being we won&apos;t do anything in individual drivers.&lt;/p&gt;</comment>
                            <comment id="2179062" author="scott.lhommedieu" created="Tue, 12 Mar 2019 22:22:54 +0000"  >&lt;p&gt;Created &lt;a href=&quot;https://jira.mongodb.org/browse/DRIVERS-618&quot; title=&quot;Add escaping convention for dot and dollar signs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DRIVERS-618&quot;&gt;&lt;del&gt;DRIVERS-618&lt;/del&gt;&lt;/a&gt; to track how we handle this at a spec/drivers level.&lt;/p&gt;</comment>
                            <comment id="2179018" author="scott.lhommedieu" created="Tue, 12 Mar 2019 21:50:13 +0000"  >&lt;p&gt;Hi Oz,&lt;/p&gt;

&lt;p&gt;There is a way to way to&#160;bypass these limitations on the write by using run command syntax from drivers.&#160; &lt;a href=&quot;http://mongodb.github.io/mongo-java-driver/3.8/driver/tutorials/commands/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Here&lt;/a&gt;&#160;for Java.&lt;br/&gt;
 There are also some ways, noted here, to query this data with aggregations.&lt;/p&gt;

&lt;p&gt;Until the whole of the MongoDB platform is geared toward supporting this we do not want to encourage this in Drivers.&lt;/p&gt;</comment>
                            <comment id="2117947" author="ozma" created="Thu, 17 Jan 2019 07:47:27 +0000"  >&lt;p&gt;Thanks Scott, yet I don&apos;t understand why not allowing &quot;power-users&quot; that choose to skip this validation?&#160;&lt;/p&gt;

&lt;p&gt;Our data-model contains dots in fields names, the result of protecting us is that I have to modify the data model.&lt;/p&gt;

&lt;p&gt;By the way, I cloned driver-core git repo, deleted the validation, compiled it and it works fine for me.&#160;&lt;/p&gt;

&lt;p&gt;I would be very happy if I could cancel that validation with some simple configuration (env, java_opts etc.) and it will not have any effect on other parts&#160;&lt;/p&gt;

&lt;p&gt;(I not asking&#160;for queries capabilities, just not preventing an allowed insert behavior)&lt;/p&gt;</comment>
                            <comment id="2117856" author="scott.lhommedieu" created="Thu, 17 Jan 2019 03:37:42 +0000"  >&lt;p&gt;My apologies, I should have been more clear and accurate when I stated &quot;usable way&quot;.&#160;&lt;/p&gt;

&lt;p&gt;The server has not adequately defined behavior regarding reading and writing . and $ in field names such that drivers can make a clear and lasting decision on an API to expose that behavior.&#160; If we make these decisions in drivers now the drivers would provide an interface that would likely be up for deprecation as soon as the server does implement this behavior and even worse would be susceptible to breaking changes from server changes.&lt;/p&gt;

&lt;p&gt;Also, there are currently options available to write and read values with keys that contain . and $.&#160; These options aren&apos;t as simple to use as we would like (i.e. no helper methods).&#160; But, this is also because the server support for these characters in field names is not complete.&#160; See:&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30575&quot; title=&quot;Please add escaping convention for dot and dollar signs!&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30575&quot;&gt;SERVER-30575&lt;/a&gt;&#160;and &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30417&quot; title=&quot;add expression to get value by keyname from object&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30417&quot;&gt;&lt;del&gt;SERVER-30417&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rather than add driver functionality that may be invalidated by the results of those server changes we opt to continue to disallow those in drivers, wait for the changes in server and advocate that users try the options detailed in the server tickets.&lt;/p&gt;</comment>
                            <comment id="2109584" author="wajda" created="Wed, 9 Jan 2019 10:12:56 +0000"  >&lt;p&gt;Not sure I&apos;m following. What is your definition of a &lt;em&gt;usable way&lt;/em&gt;? Lacking ability to &lt;em&gt;query&lt;/em&gt;&#160;on fields with dots doesn&apos;t mean &lt;em&gt;storing&lt;/em&gt;&#160;those fields isn&apos;t usable. If I get it right the main concern here is to be able just to store and get. Isn&apos;t is a valid case in your opinion? To me it looks like a unilateral decision for forbidding this functionality in the driver has already been made in the first place.&lt;/p&gt;</comment>
                            <comment id="2109571" author="ozma" created="Wed, 9 Jan 2019 09:58:02 +0000"  >&lt;p&gt;@Scott L&apos;Hommedieu, The server supports storing such documents, the problem is only in querying. Preventing insert from on the driver side is changing the declared behaviour of MongoDB.&lt;/p&gt;

&lt;p&gt;What about making it configurable, e.g by adding some JVM_OPTS that will allow the user disabling this validation?&#160;&lt;/p&gt;</comment>
                            <comment id="2109466" author="scott.lhommedieu" created="Wed, 9 Jan 2019 06:01:18 +0000"  >&lt;p&gt;We don&apos;t want to make a unilateral decision in any drivers for behavior of all query functionality.&#160; Server does not support this in a usable way.&#160; This is blocked on&#160;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30575&quot; title=&quot;Please add escaping convention for dot and dollar signs!&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-30575&quot;&gt;SERVER-30575&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1990656" author="banst" created="Fri, 31 Aug 2018 10:01:38 +0000"  >&lt;p&gt;@Michael Everett During my debugging, I found the flag in the Node.js driver, but it&apos;is not documented. Flag is &lt;b&gt;checkKeys&lt;/b&gt;, you can see an exemple on &lt;a href=&quot;https://jira.mongodb.org/browse/NODE-1645?focusedCommentId=1990655&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1990655&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt;. Maybe this hidden flag exists in the Java driver too ?&lt;/p&gt;</comment>
                            <comment id="1984041" author="meverett@squarespace.com" created="Thu, 23 Aug 2018 17:13:56 +0000"  >&lt;p&gt;@BHackett This seems like an overly restrictive approach to solving this problem. The reality is, there are many very valid reasons to want to store fields that contains these characters without ever wanting to query against them (storing JSON that you haven&apos;t generated, storing JsonSchema are two that come to mind). I&apos;d imagine that these are the most common use cases for wanting fields containing these characters.&lt;/p&gt;

&lt;p&gt;If the server is supporting these characters, at the very least it seems the driver should include a flag to disable this validation.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="1969728" author="metanomi" created="Tue, 7 Aug 2018 21:14:33 +0000"  >&lt;p&gt;I&apos;m sticking data into Mongo using Java in one environment and then pulling whole docs from collections by an indexed root property (rocket fast) and managing grouping/aggregation in JavaScript code in Node.JS in another environment, using bracket instead of dot notation (also rocket fast ...didn&apos;t do in Mongo because a bit complex of an operation for agg pipeline and dead simple in custom code).&lt;/p&gt;

&lt;p&gt;I get what you are saying, but there is definitely a use case for just being able to get the data in using Java at least.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="1969488" author="behackett" created="Tue, 7 Aug 2018 18:29:23 +0000"  >&lt;p&gt;Though dots and dollar signs are now allowed in keys by the server, there is still no way to unambiguously query on such fields. You can put the data in, but you may have a very hard time getting it back out. Until that problem is solved in the server we&apos;ll still be rejecting these keys in drivers. &lt;/p&gt;</comment>
                            <comment id="1969233" author="metanomi" created="Tue, 7 Aug 2018 16:00:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/pull/480&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/pull/480&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="414602">SERVER-30575</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="743391">JAVA-3273</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="637981">JAVA-3101</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_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5002K00000daINIQA2]]]></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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|htk03j:</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>