Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-653

How to get a Single column from tha database ?

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • API
    • None
    • 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

      Attachments

        Activity

          People

            Unassigned Unassigned
            hkonakanchi Harshavardhan Konakanchi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: