<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:51:49 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-238] add optional parameter dropTarget to DBCollection.rename()</title>
                <link>https://jira.mongodb.org/browse/JAVA-238</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;The mongodb shell allows to rename a collection and optionally drop the target. It would be great to be able to do this in the java driver, too. I.E.:&lt;br/&gt;
    public DBCollection rename( String newName,  boolean dropTarget ) &lt;br/&gt;
        throws MongoException &lt;/p&gt;
{
        
        CommandResult ret = 
            _db.getSisterDB( &quot;admin&quot; )
            .command( BasicDBObjectBuilder.start()
                      .add( &quot;renameCollection&quot; , _fullName )
                      .add( &quot;to&quot; , _db._name + &quot;.&quot; + newName )
                      .add( &quot;dropTarget&quot;, dropTarget)
                      .get() );
        ret.throwOnError();
        resetIndexCache();
        return _db.getCollection( newName );
    }</description>
                <environment></environment>
        <key id="14018">JAVA-238</key>
            <summary>add optional parameter dropTarget to DBCollection.rename()</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="antoine">Antoine Girbal</assignee>
                                    <reporter username="grmblfrz">Swen Th&#252;mmler</reporter>
                        <labels>
                    </labels>
                <created>Mon, 20 Dec 2010 12:31:37 +0000</created>
                <updated>Thu, 17 Mar 2011 19:13:54 +0000</updated>
                            <resolved>Mon, 7 Feb 2011 23:45:38 +0000</resolved>
                                    <version>2.3</version>
                                    <fixVersion>2.5</fixVersion>
                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="25941" author="auto" created="Tue, 15 Mar 2011 18:03:28 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;bwmcadams&apos;, u&apos;name&apos;: u&apos;Brendan W. McAdams&apos;, u&apos;email&apos;: u&apos;brendan@10gen.com&apos;}
&lt;p&gt;Message: SCALA-22 Added a dropTarget boolean option to rename collection, which&lt;br/&gt;
specifies behavior if named target collection already exists, proxies&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-238&quot; title=&quot;add optional parameter dropTarget to DBCollection.rename()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-238&quot;&gt;&lt;del&gt;JAVA-238&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/casbah/commit/25e2c29074b64f15ca6e37d85a8cd71a97c4e264&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/casbah/commit/25e2c29074b64f15ca6e37d85a8cd71a97c4e264&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="23318" author="antoine" created="Mon, 7 Feb 2011 23:45:38 +0000"  >&lt;p&gt;implemented and added test&lt;/p&gt;</comment>
                            <comment id="23317" author="auto" created="Mon, 7 Feb 2011 23:42:54 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-238&quot; title=&quot;add optional parameter dropTarget to DBCollection.rename()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-238&quot;&gt;&lt;del&gt;JAVA-238&lt;/del&gt;&lt;/a&gt;: add optional parameter dropTarget to DBCollection.rename()&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/commit/2ae5e43f618d113adda2468d4e93437ce0cb57ab&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-java-driver/commit/2ae5e43f618d113adda2468d4e93437ce0cb57ab&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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|hrgiu7:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9995</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>