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

Using BasicDBObjects, what happens if I append the same key more than once?

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.12.3
    • None

    Description

      I haven't found in any javadoc or documentation what's the behavior of the BasicDBObject.append() with this code:

      BasicDBObject query;
      query.append("propertyName", value);
      .... // more code, maybe a loop
      query.append("propertyName", anotherValue);

      Is this the JS equivalent of: query =

      {propertyName: value, propertyName:anotherValue}

      ?

      I know what does exactly happen in JS, but in Java I'm not sure.

      Attachments

        Activity

          People

            Unassigned Unassigned
            antonimmo Antonio Quintana
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: