<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:02:55 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-4776] Support missing values for primitive types when decoding POJOs or records</title>
                <link>https://jira.mongodb.org/browse/JAVA-4776</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;When decoding into either a record or a POJO with a &lt;tt&gt;BsonCreator&lt;/tt&gt;-annotated constructor, and where there is a record component or constructor argument with primitive type, decoding a BSON document into the record or POJO will throw an exception if the BSON document is either missing a value for the corresponding field or if the value is null.&lt;/p&gt;

&lt;p&gt;We should consider supporting this scenario in some way without throwing an exception. Options include:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Automatically using the default value (e.g. 0, false) for the primitive (this is actually the default behavior of the Jackson decoder).&lt;/li&gt;
	&lt;li&gt;Support an annotation on the component or field indicating that the default value should be used (or perhaps some other value)&lt;/li&gt;
	&lt;li&gt;Support multiple constructors instead of the single canonical constructor for records or the single &lt;tt&gt;BsonCreator&lt;/tt&gt;-annotated constructor for POJOs.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Workarounds for the current behavior include:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;For any fields that may not be included in the query response, make the corresponding record component or POJO field a reference type (e.g. Integer instead of int), so that it&apos;s nullable&lt;/li&gt;
	&lt;li&gt;Create new records or POJOs for each possible projection&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="2160318">JAVA-4776</key>
            <summary>Support missing values for primitive types when decoding POJOs or records</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="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Oct 2022 13:58:07 +0000</created>
                <updated>Wed, 27 Sep 2023 21:08:41 +0000</updated>
                                                                            <component>POJO</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                        <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1.  What would you like to communicate to the user about this feature?&lt;br/&gt;
2.  Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3.  Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_21553" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Quarter</customfieldname>
                        <customfieldvalues>
                                        <label>FY24Q4</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i0wxyw:</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>