<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:00:25 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-3784] Array List order not maintained sometimes</title>
                <link>https://jira.mongodb.org/browse/JAVA-3784</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Regarding handling lists in Mongo using the Java driver (3.2.2) and mongo db version 3.4&lt;br/&gt;
&#160;&lt;br/&gt;
We have been creating a list of strings as follows and storing them in Mongo:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Document result = new Document();&lt;br/&gt;
result.put(&quot;_id&quot;, i);&lt;br/&gt;
&#160;&lt;br/&gt;
List&amp;lt;String&amp;gt; list = new ArrayList&amp;lt;&amp;gt;();&lt;br/&gt;
list.add(&quot;john&quot;);&lt;br/&gt;
list.add(&quot;jack&quot;);&lt;br/&gt;
result.put(&quot;listName&quot;, list);&lt;br/&gt;
testCollection.insertOne(result);&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&#160;&lt;br/&gt;
But, my colleague was testing some code and noticed that the order in one of the items in the list after retrieval from mongo was different than the order that was inserted, but we haven&apos;t been able to replicate the issue again.&lt;br/&gt;
&#160;&lt;br/&gt;
Is the way we are handling this the right way to do it or do you suggest that we also insert the list order along with the objects?&lt;br/&gt;
&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1406809">JAVA-3784</key>
            <summary>Array List order not maintained sometimes</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="asthagupta92@gmail.com">Astha Gupta</reporter>
                        <labels>
                    </labels>
                <created>Fri, 10 Jul 2020 19:43:17 +0000</created>
                <updated>Mon, 27 Jul 2020 14:06:51 +0000</updated>
                            <resolved>Mon, 27 Jul 2020 14:06:51 +0000</resolved>
                                    <version>3.4.0</version>
                                                    <component>Test Failure</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="3307252" author="esha.bhargava" created="Mon, 27 Jul 2020 14:06:40 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asthagupta92%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;asthagupta92@gmail.com&quot;&gt;asthagupta92@gmail.com&lt;/a&gt; Thanks for your report! Please note that this project is for reporting bugs or feature suggestions for the driver. For MongoDB-related support discussion please post on the &lt;a href=&quot;https://community.mongodb.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB Community Forums&lt;/a&gt;. A question like this involving more discussion would be best posted on the MongoDB community.&lt;/p&gt;</comment>
                            <comment id="3280622" author="jeff.yemin" created="Fri, 10 Jul 2020 19:47:02 +0000"  >&lt;p&gt;The Java code looks fine. Is it possible that the document is also being updated after insertion, and the update is responsible for the re-ordering?&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|hxcndj:</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>