<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:59:33 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-3416] Add Query Deserialization Validation for unrecognized fields</title>
                <link>https://jira.mongodb.org/browse/JAVA-3416</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;When the Mongo Java Driver deserializes BSON objects to POJOs it ignores fields that it does not recognize.&lt;/p&gt;

&lt;p&gt;We are interested in a new feature that would enable throwing exceptions when unknown fields are found while deserializing using the PojoCodec. There is &lt;a href=&quot;http://mongodb.github.io/mongo-csharp-driver/1.11/serialization/#class-level-serialization-options&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;behavior analogous to this in the .NET driver&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It seems like there were a couple options discussed in the &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-2218&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;original POJO codec project&lt;/a&gt; when considering what to do when we find fields in documents that are not found in the Java POJO objects. Taken from that ticket, those were:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;b&gt;(currently implemented)&lt;/b&gt; skipping that document field&lt;/li&gt;
	&lt;li&gt;Throwing an exception&lt;/li&gt;
	&lt;li&gt;Dumping extra fields to an optional BsonDocument on the object to hold the extra fields&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Would you all consider an implementation that would (optionally) take approach (2) or (3)? We would be interested in submitting a PR if you agree that the functionality would be useful and worth adding.&lt;/p&gt;</description>
                <environment></environment>
        <key id="911764">JAVA-3416</key>
            <summary>Add Query Deserialization Validation for unrecognized fields</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="evan.nixon@mongodb.com">Evan Nixon</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Aug 2019 20:35:03 +0000</created>
                <updated>Wed, 30 Mar 2022 22:59:52 +0000</updated>
                                                                            <component>Codecs</component>
                                        <votes>0</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="2783044" author="doug.tarr" created="Tue, 4 Feb 2020 18:13:31 +0000"  >&lt;p&gt;One use case is misspellings in queries:&lt;/p&gt;

&lt;p&gt;This query is correct and would execute a wildcard match in mongot&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;   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;$searchBeta: { term: { path: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;name&quot;&lt;/span&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;, query: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;java*&quot;&lt;/span&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;, wildcard: &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;true&lt;/span&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;


&lt;p&gt;This query has a misspelling &quot;&lt;b&gt;wildcad&lt;/b&gt;&quot; but since the &quot;wildcard&quot; parameter is optional, we would just execute a non-wildcard query (which would likely return empty results)&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;   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;$searchBeta: { term: { path: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;name&quot;&lt;/span&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;, query: &lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&quot;java*&quot;&lt;/span&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;, wildcad: &lt;/span&gt;&lt;span style=&quot;color: #006699; font-weight: bold; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;true&lt;/span&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;

&lt;p&gt;We would like this second query to be able to throw an exception.&lt;/p&gt;</comment>
                            <comment id="2783025" author="jeff.yemin" created="Tue, 4 Feb 2020 18:03:33 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=doug.tarr&quot; class=&quot;user-hover&quot; rel=&quot;doug.tarr&quot;&gt;doug.tarr&lt;/a&gt; can you describe the usability problem in more detail?   We want to understand what sort of pain this is causing.&lt;/p&gt;</comment>
                            <comment id="2783002" author="esha.bhargava" created="Tue, 4 Feb 2020 17:55:29 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt; See Doug&apos;s ask above.&lt;/p&gt;</comment>
                            <comment id="2782943" author="doug.tarr" created="Tue, 4 Feb 2020 17:38:06 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=esha.bhargava&quot; class=&quot;user-hover&quot; rel=&quot;esha.bhargava&quot;&gt;esha.bhargava&lt;/a&gt; - unfortunately we have not been able to prioritize this work, but it creates a usability problem for Search.&lt;/p&gt;

&lt;p&gt;Wondering what the process would be to get this prioritized for the Java Drivers team?&#160;&lt;/p&gt;</comment>
                            <comment id="2414704" author="evan.nixon" created="Tue, 10 Sep 2019 15:47:04 +0000"  >&lt;p&gt;Great - sounds good. We are aiming to do this this quarter - and would certainly appreciate talking through the design when this gets closer!&lt;/p&gt;</comment>
                            <comment id="2414476" author="esha.bhargava" created="Tue, 10 Sep 2019 14:25:46 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=evan.nixon&quot; class=&quot;user-hover&quot; rel=&quot;evan.nixon&quot;&gt;evan.nixon&lt;/a&gt; We&apos;d love to see a PR for this. Let us know if you want to discuss the design.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="293016">JAVA-2218</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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hvcfan:</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>