[JAVA-653] How to get a Single column from tha database ? Created: 27/Sep/12  Updated: 26/Dec/19  Resolved: 27/Sep/12

Status: Closed
Project: Java Driver
Component/s: API
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Harshavardhan Konakanchi Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Java API



 Description   

I need to get a single column values which are distinct. My table has three fields & none of them is primary.

id, segment, active. I had written the following code, but it returns a result of size '0'.

DBObject target = new BasicDBObject();
target.put("segment", segmentId);
target.put("active", "true");

List<String> result = targetList.distinct("id",target)

The value of result.size() is 0



 Comments   
Comment by Jeffrey Yemin [ 27/Sep/12 ]

This sort of question is best addressed in our users group. You can start a conversation at https://groups.google.com/forum/?fromgroups#!forum/mongodb-user.

Generated at Thu Feb 08 08:52:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.