<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:52:46 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-653] How to get a Single column from tha database ?</title>
                <link>https://jira.mongodb.org/browse/JAVA-653</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I need to get a single column values which are distinct. My table has three fields &amp;amp; none of them is primary. &lt;/p&gt;

&lt;p&gt;id, segment, active. I had written the following code, but it returns a result of size &apos;0&apos;.&lt;/p&gt;

&lt;p&gt;DBObject target = new BasicDBObject();&lt;br/&gt;
target.put(&quot;segment&quot;, segmentId);&lt;br/&gt;
target.put(&quot;active&quot;, &quot;true&quot;);&lt;/p&gt;

&lt;p&gt;List&amp;lt;String&amp;gt; result = targetList.distinct(&quot;id&quot;,target)&lt;/p&gt;


&lt;p&gt;The value of result.size() is 0&lt;/p&gt;</description>
                <environment>Java API</environment>
        <key id="51584">JAVA-653</key>
            <summary>How to get a Single column from tha database ?</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="hkonakanchi">Harshavardhan Konakanchi</reporter>
                        <labels>
                    </labels>
                <created>Thu, 27 Sep 2012 05:55:51 +0000</created>
                <updated>Thu, 26 Dec 2019 19:57:57 +0000</updated>
                            <resolved>Thu, 27 Sep 2012 13:19:24 +0000</resolved>
                                                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="168680" author="jeff.yemin" created="Thu, 27 Sep 2012 13:18:52 +0000"  >&lt;p&gt;This sort of question is best addressed in our users group.  You can start a conversation at &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;/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|hrj3bb:</customfieldvalue>

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