<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:36 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-576] Setting DBEncoder for $cmd collection has no effect</title>
                <link>https://jira.mongodb.org/browse/JAVA-576</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;When running the attached TestCase, I&apos;ll not see any outputs due to the fact that findAndModify Operations are run from the $cmd Collection. The corresponding DBApiLayer.MyCollection.__find(DBObject, DBObject, int, int, int, int, ReadPreference, DBDecoder) call is accessing OutMessage.query without handling a DBEncoder, so the driver falls back to the defaultEncoder ignoring custom set Encoders through db.getCollection(&quot;$cmd&quot;).setDBEncoderFactory(). From my point of view the driver should be set per Default to a given Encoder/Decoder(-Factory), which then can be overriden with a custom Encoder/Decoder(-Factory).&lt;/p&gt;

&lt;p&gt;Attached is as well a patch fixing this specific mentioned problem, but other locations referencing DB(En|De)coder.FACTORY should be considered for changes as well.&lt;/p&gt;</description>
                <environment>Fedora Linux 16 64bit, Mongodb 2.0.3</environment>
        <key id="39802">JAVA-576</key>
            <summary>Setting DBEncoder for $cmd collection has no effect</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="pheinze">Philipp Heinze</reporter>
                        <labels>
                    </labels>
                <created>Tue, 29 May 2012 11:11:01 +0000</created>
                <updated>Fri, 30 Jan 2015 18:37:35 +0000</updated>
                            <resolved>Tue, 10 Jun 2014 19:52:24 +0000</resolved>
                                    <version>2.7.2</version>
                                    <fixVersion>3.0.0</fixVersion>
                                    <component>Codecs</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="817714" author="xgen-internal-githook" created="Fri, 30 Jan 2015 18:37:35 +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-576&quot; title=&quot;Setting DBEncoder for $cmd collection has no effect&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-576&quot;&gt;&lt;del&gt;JAVA-576&lt;/del&gt;&lt;/a&gt;: Added test to ensure that findAndModify/findAndRemove uses the object class&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/c65f8ed1b4ba6c0f4f824ccfee7efb6ed102338b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/c65f8ed1b4ba6c0f4f824ccfee7efb6ed102338b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="616032" author="jeff.yemin" created="Tue, 10 Jun 2014 19:52:24 +0000"  >&lt;p&gt;Added tests to ensure that findAndModify/findAndRemove use custom object class.&lt;/p&gt;</comment>
                            <comment id="616031" author="xgen-internal-githook" created="Tue, 10 Jun 2014 19:51:46 +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-576&quot; title=&quot;Setting DBEncoder for $cmd collection has no effect&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-576&quot;&gt;&lt;del&gt;JAVA-576&lt;/del&gt;&lt;/a&gt;: Added test to ensure that findAndModify/findAndRemove uses the object class&lt;br/&gt;
Branch: 3.0.x&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/c65f8ed1b4ba6c0f4f824ccfee7efb6ed102338b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/c65f8ed1b4ba6c0f4f824ccfee7efb6ed102338b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="125562" author="jeff.yemin" created="Mon, 4 Jun 2012 00:35:05 +0000"  >&lt;p&gt;It is a sort of a CRUD method.  I&apos;m more trying to find out what your need for a customer encoder is in this particular case.&lt;/p&gt;</comment>
                            <comment id="124194" author="pheinze" created="Wed, 30 May 2012 06:30:43 +0000"  >&lt;p&gt;I&apos;m trying to perform something like introspection. The Unit under test consists of a function performing several tasks, one of it is updating a document with findAndModify (for atomic retrieve and update). I may be able to refactor my code so that I can check states after the findAndModify call. Anyway I&apos;m not sure if this would always make sense.&lt;/p&gt;

&lt;p&gt;If I understand the code correctly findAndModify isn&apos;t a simple find method and there&apos;s only one command sent, which contains find and update at the same time. So I would consider it as CRUD method as well?&lt;/p&gt;</comment>
                            <comment id="124131" author="jeff.yemin" created="Wed, 30 May 2012 00:38:35 +0000"  >&lt;p&gt;Thanks for the bug report.  Currently all of the find methods in DBCollection ignore the encoder.  It&apos;s used only for insert/update.  Can you describe your use case for a custom encoder for findAndModify?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="16874" name="Introspection.zip" size="4891" author="pheinze" created="Tue, 29 May 2012 11:11:01 +0000"/>
                    </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|hrfcy7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1971</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="161">Sprint 2 - May 5 - May 23</customfieldvalue>
    <customfieldvalue id="185">Sprint 3 - May 27 - June 13</customfieldvalue>

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