You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
final selectorBuilder = where
..eq(...)
..eq(...)
..get(...)
..notExists(...)
..limit(3)
..sortBy(...);
final modifierBuilder = modify.set(..., ...);
final result = await _dbCollection.updateMany(selectorBuilder, modifierBuilder);
The result of result.nModified is the number of all documents that match and these documents were updated.
How to use limit and sortBy with updateMany?
The text was updated successfully, but these errors were encountered:
Hi, the limit is not an available parameter for the update (in general) function. Check the following to see a possible solution.
For the sortBy I will have to do a fix.
Also the sortBy is not an updateMany parameter. In this case you can use the hint (index name) or hint document (index description) to suggest the server to order in a certain way. Consider that it is just an hint, and the server could decide to use another index.
I tried with
The result of
result.nModified
is the number of all documents that match and these documents were updated.How to use
limit
andsortBy
withupdateMany
?The text was updated successfully, but these errors were encountered: