diff --git a/src/tmongoquery.cpp b/src/tmongoquery.cpp index 2f1b326bf..1bcee0685 100644 --- a/src/tmongoquery.cpp +++ b/src/tmongoquery.cpp @@ -226,13 +226,13 @@ int TMongoQuery::update(const QVariantMap &criteria, const QVariantMap &document Updates existing documents of the selection criteria \a criteria in the collection with new document \a document. */ -int TMongoQuery::updateMulti(const QVariantMap &criteria, const QVariantMap &document) +int TMongoQuery::updateMany(const QVariantMap &criteria, const QVariantMap &document) { int modifiedCount = -1; QVariantMap doc; if (!_database.isValid()) { - tSystemError("TMongoQuery::updateMulti : driver not loaded"); + tSystemError("TMongoQuery::updateMany : driver not loaded"); return modifiedCount; } @@ -247,7 +247,7 @@ int TMongoQuery::updateMulti(const QVariantMap &criteria, const QVariantMap &doc if (res) { modifiedCount = reply.value(QStringLiteral("modifiedCount")).toInt(); } - tSystemDebug("TMongoQuery::updateMulti modifiedCount:%d", modifiedCount); + tSystemDebug("TMongoQuery::updateMany modifiedCount:%d", modifiedCount); return modifiedCount; } diff --git a/src/tmongoquery.h b/src/tmongoquery.h index f78f64866..a94a25e10 100644 --- a/src/tmongoquery.h +++ b/src/tmongoquery.h @@ -26,7 +26,8 @@ class T_CORE_EXPORT TMongoQuery { bool insert(QVariantMap &document); int update(const QVariantMap &criteria, const QVariantMap &document, bool upsert = false); bool updateById(const QVariantMap &document); - int updateMulti(const QVariantMap &criteria, const QVariantMap &document); + int updateMany(const QVariantMap &criteria, const QVariantMap &document); + int updateMulti(const QVariantMap &criteria, const QVariantMap &document) { return updateMany(criteria, document); } int remove(const QVariantMap &criteria); bool removeById(const QVariantMap &document); int count(const QVariantMap &criteria = QVariantMap());