<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:48 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-1102] DBRefBase should implement Serializable</title>
                <link>https://jira.mongodb.org/browse/JAVA-1102</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;DBRef and DBRefBase should implement Serializable to match all the other supported BSON types.&lt;/p&gt;

&lt;p&gt;Implementation note:  Since DB instances are not serializable, the DB property is marked as transient and will not survive deserialization.  As a result, deserialized DBRef instances can not be fetched using the fetch method.&lt;/p&gt;</description>
                <environment></environment>
        <key id="108993">JAVA-1102</key>
            <summary>DBRefBase should implement Serializable</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="9">Done</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="ssheehy">Steven Sheehy</reporter>
                        <labels>
                    </labels>
                <created>Fri, 31 Jan 2014 20:25:07 +0000</created>
                <updated>Thu, 3 Apr 2014 15:21:43 +0000</updated>
                            <resolved>Fri, 28 Feb 2014 18:16:00 +0000</resolved>
                                    <version>2.9.3</version>
                                    <fixVersion>2.12.0</fixVersion>
                    <fixVersion>3.0.0</fixVersion>
                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="507623" author="jeff.yemin" created="Sat, 1 Mar 2014 00:56:23 +0000"  >&lt;p&gt;Can you post your compiler output?  2.12.0-rc0 should for the most part be binary compatible with 2.9.3.  It does deprecate a lot of methods, but none are removed yet.&lt;/p&gt;


&lt;p&gt;Thanks,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="507394" author="ssheehy" created="Fri, 28 Feb 2014 20:30:52 +0000"  >&lt;p&gt;Tried to upgrade the java driver on our codebase, but there were too many API changes in between the version we had and 2.12.0-rc0. It would require a lot of changes to test it out. However, I did review the code changes and it was the same as I made locally to get it to work. So I can confirm it fixes the issue.&lt;/p&gt;</comment>
                            <comment id="507265" author="xgen-internal-githook" created="Fri, 28 Feb 2014 18:15:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1102&quot; title=&quot;DBRefBase should implement Serializable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1102&quot;&gt;&lt;del&gt;JAVA-1102&lt;/del&gt;&lt;/a&gt;: DBRef classes are now serializable&lt;br/&gt;
Branch: 3.0.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/a7f81cb5e744f3d2a13ae48ab8a9d1fb10c7efb0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/a7f81cb5e744f3d2a13ae48ab8a9d1fb10c7efb0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="506336" author="jeff.yemin" created="Thu, 27 Feb 2014 14:56:40 +0000"  >&lt;p&gt;Hi Steven,&lt;/p&gt;

&lt;p&gt;Can you test the fix for this issue in 2.12.0-rc0, available either on &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/releases/tag/r2.12.0-rc0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;github&lt;/a&gt; or &lt;a href=&quot;http://central.maven.org/maven2/org/mongodb/mongo-java-driver/2.12.0-rc0/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Maven Central&lt;/a&gt;. &lt;/p&gt;


&lt;p&gt;Thanks,&lt;br/&gt;
Jeff&lt;/p&gt;</comment>
                            <comment id="498283" author="jeff.yemin" created="Thu, 13 Feb 2014 02:41:54 +0000"  >&lt;p&gt;Implemented in master. 3.0 next.&lt;/p&gt;</comment>
                            <comment id="498282" author="xgen-internal-githook" created="Thu, 13 Feb 2014 02:40:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;jyemin&apos;, u&apos;name&apos;: u&apos;Jeff Yemin&apos;, u&apos;email&apos;: u&apos;jeff.yemin@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1102&quot; title=&quot;DBRefBase should implement Serializable&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1102&quot;&gt;&lt;del&gt;JAVA-1102&lt;/del&gt;&lt;/a&gt;: Make DBRef and DBRefBase Serializable&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/e9e558c066d24cfdd15a7c8d99dcf68f7a27c725&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/e9e558c066d24cfdd15a7c8d99dcf68f7a27c725&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="495480" author="ssheehy" created="Fri, 7 Feb 2014 20:32:54 +0000"  >&lt;p&gt;3.0.x driver doesn&apos;t even have fetch, so should be trivial to implement Serializable there:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/blob/3.0.x/driver/src/main/org/mongodb/DBRef.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/blob/3.0.x/driver/src/main/org/mongodb/DBRef.java&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I agree that it may break the contract of DBRef.fetch(), but only after deserialization occurs. Considering right now it cannot serialize/deserialize at all, it would not break anyone&apos;s code to not support fetch after deserializing (since there code would break before then). If need be, a setDB() method can be added so that users can set it if need be after deserializing. DBRef is already not immutable due to the _pointedTo and adding this method would not break API compatibility.&lt;/p&gt;</comment>
                            <comment id="493080" author="jeff.yemin" created="Tue, 4 Feb 2014 17:15:22 +0000"  >&lt;p&gt;I&apos;ll have to think about this a bit more.  While it make work for you, it does break the contract of DBRef to not be able to fetch, so it could lead to surprising results (though admittedly less surprising that not being able to serialize at all.).&lt;/p&gt;</comment>
                            <comment id="493040" author="ssheehy" created="Tue, 4 Feb 2014 16:29:33 +0000"  >&lt;p&gt;We just marked the _db field as transient to indicate it should not be serialized in our local code. The DB is for us an optional field since it is only used during calls to fetch(). Since we don&apos;t use fetch, it is not an issue for us. The MongoDB java driver also does not serialize the _db field when writing the DBRef to the database, so I don&apos;t think standard Java serialization needs to do anything different.&lt;/p&gt;</comment>
                            <comment id="491981" author="jeff.yemin" created="Sun, 2 Feb 2014 13:10:52 +0000"  >&lt;p&gt;Hi Steven,&lt;/p&gt;

&lt;p&gt;Unfortunately I don&apos;t see a way for DBRefBase to be serializable, due to the _db field of type DB.  When deserializing there is no way to reconstruct that reference, as it would require a Mongo instance to do so.&lt;/p&gt;</comment>
                            <comment id="491736" author="ssheehy" created="Fri, 31 Jan 2014 20:28:12 +0000"  >&lt;p&gt;We need to be able to take DBObjects and be able to place them on a JMS queue for asynchronous processing. The JMS serialization will fail with a NotSerializableException if the DBObject contains a DBRef because that class does not implement Serializable.&lt;/p&gt;</comment>
                    </comments>
                    <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|hrg95j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>8388</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="107">Sprint 4</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>