diff --git a/lib/model.js b/lib/model.js index 4603313..6e4d573 100644 --- a/lib/model.js +++ b/lib/model.js @@ -920,9 +920,11 @@ class BaseModel { ExpressionAttributeValues: mergedExprAttributeValues, ExpressionAttributeNames: mergedExprAttributeNames, ...(ExclusiveStartKey && {ExclusiveStartKey}), - // TODO: not sure if this will mess up pagination? - // set the dynamodb Limit to the options limit, or the maximum supported, so that we don't evaluate more items than necessary - // ...(options.limit && {Limit:options.limit}) + // set the dynamodb Limit to the options limit, so that we don't + // evaluate more items than necessary. If making a query with a + // filter expression it may make sense to specify a larger limit, + // in which case that can be specified in otherOptions.Limit + ...(options.limit && {Limit: options.limit}) }, otherOptions); } }