<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:02: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-4622] Support existing pojo annotations for encoding/decoding Java records</title>
                <link>https://jira.mongodb.org/browse/JAVA-4622</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;With our support for encoding/decoding Java records introduced in the 4.6.0 release, the driver introduced new annotations in the &lt;tt&gt;org.bson.codecs.record.annotations&lt;/tt&gt; package (in the &lt;tt&gt;bson-record-codec&lt;/tt&gt; module). The three annotations, &lt;tt&gt;BsonId&lt;/tt&gt;, &lt;tt&gt;BsonRepresentation&lt;/tt&gt;, and &lt;tt&gt;BsonProperty&lt;/tt&gt;, mirror the already-existing ones that we have for POJOs in &lt;tt&gt;org.bson.codecs.pojo.annotations&lt;/tt&gt; package (in the &lt;tt&gt;bson&lt;/tt&gt; module). There are two problems with these annotations:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;tt&gt;mongodb-driver-core&lt;/tt&gt; takes an &lt;tt&gt;implementation&lt;/tt&gt; rather than an &lt;tt&gt;api&lt;/tt&gt; dependency on &lt;tt&gt;bson-record-codec&lt;/tt&gt;. This means that applications that depend on core (usually via driver-sync) won&apos;t be able to reference these annotations unless they take an explicit dependency on &lt;tt&gt;bson-record-codec&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;The existing annotations can accidentally be applied even to records, but the driver ignores them. This will be really confusing to application authors.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;We need to make a decision here. The two obvious choices are:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Continue down the path of separate annotations for records and POJOs. For this route, we should
	&lt;ol&gt;
		&lt;li&gt;Change the dependency to &lt;tt&gt;api&lt;/tt&gt; so that applications will automatically have access to the annotations without explicitly adding a dependency on {
&lt;div class=&quot;error&quot;&gt;&lt;span class=&quot;error&quot;&gt;Unknown macro: {bson-record-codec}&lt;/span&gt; &lt;/div&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/li&gt;
		&lt;li&gt;Report runtime errors if RecordCodec detects any of the pojo annotations&#160;&lt;/li&gt;
	&lt;/ol&gt;
	&lt;/li&gt;
	&lt;li&gt;Support the pojo annotations in our record encoder/decoder. For this path, we should additionally deprecate the new annotations and stop documenting them.&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="2049587">JAVA-4622</key>
            <summary>Support existing pojo annotations for encoding/decoding Java records</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="13201">Fixed</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="jeff.yemin@mongodb.com">Jeffrey Yemin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 18 May 2022 15:00:03 +0000</created>
                <updated>Sat, 28 Oct 2023 11:20:42 +0000</updated>
                            <resolved>Wed, 1 Jun 2022 13:08:42 +0000</resolved>
                                                    <fixVersion>4.7.0</fixVersion>
                                    <component>BSON</component>
                    <component>POJO</component>
                                        <votes>2</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4586297" author="xgen-internal-githook" created="Wed, 1 Jun 2022 13:08:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Jeff Yemin&apos;, &apos;email&apos;: &apos;jeff.yemin@mongodb.com&apos;, &apos;username&apos;: &apos;jyemin&apos;}
&lt;p&gt;Message: Support the existing pojo annotations on records (#944)&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Look for the pojo annotations on the declared fields of the record.&lt;/li&gt;
	&lt;li&gt;Check for unsupported pojo annotations and throw CodecConfigurationException if found&lt;/li&gt;
	&lt;li&gt;Deprecate the record-specific annotations introduced in the 4.6 release&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-4622&quot; title=&quot;Support existing pojo annotations for encoding/decoding Java records&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-4622&quot;&gt;&lt;del&gt;JAVA-4622&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/a2e3bebb6f66c29b39958f5a8b3baa71d188db40&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/a2e3bebb6f66c29b39958f5a8b3baa71d188db40&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10320">
                    <name>Documented</name>
                                                                <inwardlinks description="is documented by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1063320">JAVA-3567</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></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_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10250"><![CDATA[Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr3mmh:04005o</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>