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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.12.3
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Unassigned
            Reporter:
            Antonio Quintana
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: