We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In service.js (line 104) method _getQueryModifier is applied to mongoose query q : this._getQueryModifier(params)(q, params);
this._getQueryModifier(params)(q, params);
but when pagination is active (lines 124+), a new query is used to count the documents instead of q :
if (paginate && paginate.default) { return model.where(query)[this.useEstimatedDocumentCount ? 'estimatedDocumentCount' : 'countDocuments']() .session(params.mongoose && params.mongoose.session).exec().then(executeQuery); }
_getQueryModifier is not applied to this new query, and so the total can be false if the queryModifier function filters the original query.
This part should be :
if (paginate && paginate.default) { const w = model.where(query); this._getQueryModifier(params)(w, params); return w[this.useEstimatedDocumentCount ? 'estimatedDocumentCount' : 'countDocuments']() .session(params.mongoose && params.mongoose.session).exec().then(executeQuery); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In service.js (line 104) method _getQueryModifier is applied to mongoose query q :
this._getQueryModifier(params)(q, params);
but when pagination is active (lines 124+), a new query is used to count the documents instead of q :
_getQueryModifier is not applied to this new query, and so the total can be false if the queryModifier function filters the original query.
This part should be :
The text was updated successfully, but these errors were encountered: