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
When calling Model.paginate({}, { populate: "relation", skipInvalidIds: true}) on a document.
Given there are some invalid/no-id value in the document path
The expected behavior would be that if the path consists of invalid Id from the DB, it should be ignored.
But error: Cast to ObjectId failed for value "not-an-id" at path "model-path" is thrown
currently Mongoose support option { justOne: true, skipInvalidIds: true} to do this.
{ justOne: true, skipInvalidIds: true}
Is there a way to achieve this currently?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When calling Model.paginate({}, { populate: "relation", skipInvalidIds: true}) on a document.
Given there are some invalid/no-id value in the document path
The expected behavior would be that if the path consists of invalid Id from the DB, it should be ignored.
But error: Cast to ObjectId failed for value "not-an-id" at path "model-path" is thrown
currently Mongoose support option
{ justOne: true, skipInvalidIds: true}
to do this.Is there a way to achieve this currently?
The text was updated successfully, but these errors were encountered: