<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:59:52 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-3552] Allow Mongo collection reads into a Scala case class to use the class member default value for a missing collection field</title>
                <link>https://jira.mongodb.org/browse/JAVA-3552</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Currently&#160; with&#160; 2.2.1 and higher, a case class that is registered can denote possible missing fields as Option&lt;span class=&quot;error&quot;&gt;&amp;#91;field&amp;#93;&lt;/span&gt;. Sometimes we have default values on case classes and it would be good if a collection can be read into a case class so the missing fields are replaced by the defaults&lt;/p&gt;

&lt;p&gt;for example:&#160;&lt;/p&gt;

&lt;p&gt;case class Reg (name: String, mark: Int, loc: String, date: Date = new Date())&lt;/p&gt;

&lt;p&gt;collection Registration {&quot;name&quot;: &quot;David&quot;, &quot;mark&quot;: 75, &quot;loc&quot;: &quot;The Gragg&quot; }&lt;/p&gt;

&lt;p&gt;I would like the collection Registration to be read into Reg as&lt;/p&gt;

&lt;p&gt;Reg(&quot;David&quot;, 75,&#160;&quot;The Gragg&quot;, new Date())&lt;/p&gt;</description>
                <environment>Ubuntu 16.04</environment>
        <key id="564755">JAVA-3552</key>
            <summary>Allow Mongo collection reads into a Scala case class to use the class member default value for a missing collection field</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="ensefik">Edem Nsefik</reporter>
                        <labels>
                    </labels>
                <created>Wed, 27 Jun 2018 14:01:11 +0000</created>
                <updated>Wed, 30 Mar 2022 23:08:02 +0000</updated>
                                                                            <component>Scala</component>
                                        <votes>2</votes>
                                    <watches>3</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_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6tdb:</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>