<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:58:22 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-2915] how to implement nested query in java API</title>
                <link>https://jira.mongodb.org/browse/JAVA-2915</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;db.a.find({ &quot;id&quot; : &lt;/p&gt;
{ &quot;$in&quot; : [&quot;3&quot;, &quot;5&quot;] }
&lt;p&gt; })&lt;/p&gt;

&lt;p&gt;for this query, I just create a filter like below bson object which is workable.&lt;/p&gt;

&lt;p&gt;new BasicDBObject(&quot;id&quot;, new BasicDBObject(&quot;$in&quot;, new String[] {&quot;3&quot;, &quot;5&quot;]));&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;db.a.find({ &quot;id&quot; : &lt;/p&gt;
{ &quot;$in&quot; : db.b.distinct(&quot;id&quot;) }
&lt;p&gt; })&lt;/p&gt;

&lt;p&gt;for this second query, is there a way to create a BasicDBObject for filter object.&lt;/p&gt;

&lt;p&gt;I mean how to express nested query body, db.b.distinct(&quot;id&quot;), in BasicDBObject.&lt;/p&gt;</description>
                <environment></environment>
        <key id="574668">JAVA-2915</key>
            <summary>how to implement nested query in java API</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="8666592@qq.com">jacky chen</reporter>
                        <labels>
                    </labels>
                <created>Sun, 22 Jul 2018 10:03:58 +0000</created>
                <updated>Mon, 3 Apr 2023 16:45:22 +0000</updated>
                            <resolved>Mon, 23 Jul 2018 09:13:46 +0000</resolved>
                                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1953394" author="ross@10gen.com" created="Mon, 23 Jul 2018 09:13:31 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=update0412&quot; class=&quot;user-hover&quot; rel=&quot;update0412&quot;&gt;update0412&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I believe the &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;$lookup&lt;/a&gt; aggregation pipeline is what you require.&lt;/p&gt;

&lt;p&gt;Just to let you know this project is for Java driver bugs or feature requests. The best place for questions regarding MongoDB usage or the Java driver specifics is the mongodb-user mailinglist or stackoverflow as you will reach a boarder audience there. If your business requires an answer from MongoDB within a time frame then we do offer production support.&lt;/p&gt;

&lt;p&gt;If you do follow up via one of the options above please post a link and I will follow the conversation there.&lt;/p&gt;

&lt;p&gt;All the best,&lt;/p&gt;

&lt;p&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|httuwf:</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>