BSONObject update = (BSONObject) updateObj.get("u");
boolean multi = Utils.isTrue(updateObj.get("multi"));
boolean upsert = Utils.isTrue(updateObj.get("upsert"));
final BSONObject result = updateDocuments(channel, collectionName, selector, update, multi, upsert);
updatedExisting |= Utils.isTrue(result.get("updatedExisting"));
if (result.containsField("upserted")) {
final Object id = result.get("upserted");
final BSONObject upserted = new BasicBSONObject("index", upserts.size());
upserted.put("_id", id);
upserts.add(upserted);
}