}
private DBObject merge(final DBObject object, final Object id,
final String[] excludeProperties)
throws StandardCodedException {
WriteResult result;
final DBObject existing = this.findById(id);
BeeMongoUtils.merge(object, existing, excludeProperties);
// removeOne empty arrays before save
final DBObject item = this.removeEmptyArrays(existing);
// save
result = _coll.save(item);
if (StringUtils.hasText(result.getError())) {
throw this.getError418(result.getError());
}
return item;
}