<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37: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>[CSHARP-706] Add MongoCollection.RenameCollection</title>
                <link>https://jira.mongodb.org/browse/CSHARP-706</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;This method is different from MongoDatabase.RenameCollection. One is an admin operation, the other isn&apos;t. I wrote an extension method that holds me over:&lt;/p&gt;

&lt;p&gt;        public static BsonValue RenameCollection&amp;lt;T&amp;gt;(this MongoCollection&amp;lt;T&amp;gt; collection, string newName)&lt;br/&gt;
        {&lt;br/&gt;
            var javascript = @&quot;db.&lt;/p&gt;
{0}
&lt;p&gt;.renameCollection(&apos;&lt;/p&gt;
{1}
&lt;p&gt;&apos;);&quot;.Inject(collection.Name, newName);&lt;br/&gt;
            return collection.Database.Eval(BsonJavaScript.Create(javascript));&lt;br/&gt;
        }&lt;/p&gt;</description>
                <environment></environment>
        <key id="69017">CSHARP-706</key>
            <summary>Add MongoCollection.RenameCollection</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="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="2">Won&apos;t Fix</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="tkellogg">Tim Kellogg</reporter>
                        <labels>
                            <label>renameCollection</label>
                    </labels>
                <created>Tue, 19 Mar 2013 20:07:35 +0000</created>
                <updated>Thu, 20 Mar 2014 16:38:52 +0000</updated>
                            <resolved>Wed, 27 Mar 2013 13:21:41 +0000</resolved>
                                    <version>1.8</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="293436" author="rstam" created="Tue, 19 Mar 2013 21:49:14 +0000"  >&lt;p&gt;Version 2.4 of the server doesn&apos;t require admin credentials to use RenameCollection.&lt;/p&gt;

&lt;p&gt;There is a reason that we don&apos;t have a Rename (or RenameCollection) method in MongoCollection. The name of the collection is part of the identity of the MongoCollection object, so we can&apos;t change the name of an existing MongoCollection object (it would continue to refer to the old name even if the database name had changed).&lt;/p&gt;

&lt;p&gt;While it is true that version 2.2 of the server returns an error in this case if you don&apos;t have admin credentials, I&apos;m not sure that the driver needs a workaround since server 2.4 has already shipped.&lt;/p&gt;</comment>
                            <comment id="293406" author="tkellogg" created="Tue, 19 Mar 2013 21:10:13 +0000"  >&lt;p&gt;db.renameCollection is an authorized operation. If you&apos;re running mongo 2.2 with auth you&apos;ll get an error if you&apos;re not an admin user. db.collection.renameCollection is not an admin operation&lt;/p&gt;</comment>
                            <comment id="293369" author="rstam" created="Tue, 19 Mar 2013 20:39:22 +0000"  >&lt;p&gt;Why don&apos;t you just use MongoDatabase.RenameCollection?&lt;/p&gt;

&lt;p&gt;I get that your code has implemented the rename operation differently, just not why you couldn&apos;t use MongoDatabase.RenameCollection.&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|hrmt4f:</customfieldvalue>

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