<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:24 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-2126] dup key on @CompoundIndexes</title>
                <link>https://jira.mongodb.org/browse/JAVA-2126</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I have created pojo class and use this annotation:-&lt;/p&gt;

&lt;p&gt;@CompoundIndexes(value = { @CompoundIndex(name = &quot;Metadata _ind1&quot;, def = &quot;&lt;/p&gt;
{&apos;index&apos;: 1, &apos;projectId&apos;: 1}
&lt;p&gt;&quot;, unique = true) })&lt;br/&gt;
@Document(collection = &quot;metadata&quot;)&lt;br/&gt;
public class MetadataCommBean &lt;/p&gt;
{
-- variables-- 
-- getter/ setter--
}

&lt;p&gt;and after sum updation on my list of documents i am saving my updates in collection by using mononRepository.save(updatedList)&lt;br/&gt;
and this statement throws error:-&lt;/p&gt;

&lt;p&gt;com.mongodb.MongoException$DuplicateKey: { &quot;serverUsed&quot; : &quot;localhost:27017&quot; , &quot;ok&quot; : 1 , &quot;n&quot; : 0 , &quot;updatedExisting&quot; : false , &lt;br/&gt;
&quot;err&quot; : &quot;E11000 duplicate key error collection: metadata_db.metadata index: Metadata _ind1 dup key: { : \&quot;1.1.2\&quot;, : \&quot;11\&quot; }&quot; , &quot;code&quot; : 11000}&lt;/p&gt;

&lt;p&gt;how can i solve this&lt;/p&gt;

</description>
                <environment>java 8, mongo Spring data,</environment>
        <key id="268504">JAVA-2126</key>
            <summary>dup key on @CompoundIndexes</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="-1">Unassigned</assignee>
                                    <reporter username="sorav.sahu@gmail.com">sorabh sahu</reporter>
                        <labels>
                    </labels>
                <created>Sat, 27 Feb 2016 09:36:41 +0000</created>
                <updated>Wed, 11 Sep 2019 19:09:18 +0000</updated>
                            <resolved>Mon, 29 Feb 2016 09:33:43 +0000</resolved>
                                    <version>3.2.2</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1187431" author="ross@10gen.com" created="Mon, 29 Feb 2016 09:33:43 +0000"  >&lt;p&gt;The JAVA project is intended for reporting bugs against or requesting new features in the MongoDB Java driver.  Please direct general usage questions about the driver or about MongoDB to our &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;user forum&lt;/a&gt; or to Stack Overflow.&lt;/p&gt;

&lt;p&gt;As this question seems related to Mongo Spring Data so posting on their forums may also they spring data community to be of assistance.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Ross&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|hsiudr:</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>