Driver does not support field negation

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Field negation is outlined in the mongo docs here: http://www.mongodb.org/display/DOCS/Retrieving+a+Subset+of+Fields

      It is supported in the core of mongo but not in the Java Driver.

      For example:
      BasicDBObject fields = new BasicDBObject();
      fields.put("somebigfield", "0");

      DBCursor cur = collection.find(new BasicDBObject, fields);

      Will return the "somebigfield" rather than omitting it. It doesn't matter what value is given for the field value (0, 1, xxxx) the same thing is returned - ie. somebigfield and the id

            Assignee:
            Jeffrey Yemin
            Reporter:
            Damian Harvey
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: