<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:02 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-770] Facing issue while inserting data into mongodb</title>
                <link>https://jira.mongodb.org/browse/JAVA-770</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Hi,&lt;br/&gt;
I have an object inside my mongodb like this &lt;br/&gt;
{ &quot;_id&quot; : ObjectId(&quot;5129d8a4da06f4571f45d1a2&quot;), &lt;br/&gt;
&quot;User_Id&quot; : { &lt;br/&gt;
&quot;Profile&quot; : &lt;/p&gt;
{ &quot;Naveen_009&quot;: }
&lt;p&gt; } }.&lt;br/&gt;
Now i want to check the profile value is Naveen_009,if result is true i want to insert data like this &lt;br/&gt;
&quot;Twitter&quot; : &lt;/p&gt;
{ &quot;08 Feb 2013&quot; : [ 11, 10, 0, 1 ], &quot;09 Feb 2013&quot; : [ 890, 546, 35, 309 ], &quot;10 Feb 2013&quot; : [ 728, 458, 30, 240 ] }
&lt;p&gt;.&lt;br/&gt;
To do this am using following logic.&lt;br/&gt;
BasicDBObject query =new BasicDBObject().append(&quot;009.Profile&quot;,&quot;Naveen_009&quot;);	&lt;br/&gt;
BasicDBObject newDocument3 = new BasicDBObject().append(&quot;$set&quot;, new BasicDBObject(key,arrayObj));&lt;br/&gt;
collection.findAndModify(query, newDocument3);&lt;br/&gt;
But as a result am getting result in some unwanted manner like this&lt;/p&gt;
{ &quot;009&quot; : 
{ &quot;Profile&quot; : 
{&quot;Naveen_009&quot;: }
&lt;p&gt;, &lt;br/&gt;
&quot;08 Feb 2013&quot; : [ 1253, 857, 55, 341 ], &lt;br/&gt;
&quot;09 Feb 2013&quot; : [ 890, 546, 35, 309 ], &lt;br/&gt;
&quot;10 Feb 2013&quot; : [ 728, 458, 30, 240 ] },&lt;br/&gt;
&quot;_id&quot; : ObjectId(&quot;5129bf1dda06f4709d2b98ee&quot;) }&lt;br/&gt;
Help me to get required result if u suggest some books it il be help full too.&lt;/p&gt;</description>
                <environment>Mac 10.6.8 ox</environment>
        <key id="66247">JAVA-770</key>
            <summary>Facing issue while inserting data into mongodb</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="barrie">Barrie Segal</assignee>
                                    <reporter username="naveen.coolest">Naveen Kumar</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Feb 2013 11:16:42 +0000</created>
                <updated>Tue, 26 Feb 2013 16:29:11 +0000</updated>
                            <resolved>Tue, 26 Feb 2013 16:29:11 +0000</resolved>
                                    <version>2.6.5</version>
                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="276275" author="barrie" created="Tue, 26 Feb 2013 16:24:21 +0000"  >&lt;p&gt;Hi Naveen!&lt;/p&gt;

&lt;p&gt;Our drivers projects are reserved for feature requests and bug reports. If you&apos;d like someone to help you troubleshoot this issue, I&apos;d recommend posting it on one of our community support channels:&lt;/p&gt;

&lt;ol&gt;
	&lt;li&gt;MongoDB Google group: &lt;a href=&quot;https://groups.google.com/forum/?fromgroups#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/?fromgroups#!forum/mongodb-user&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;ol&gt;
	&lt;li&gt;Stack Overflow, with &apos;mongodb&apos; tag: &lt;a href=&quot;http://stackoverflow.com/questions/tagged/mongodb&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://stackoverflow.com/questions/tagged/mongodb&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Once you post on our Google group or on SO, please paste a link to the question in this ticket so we can take a look asap.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

&lt;p&gt;Barrie &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|hrmbzr:</customfieldvalue>

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