Typings: Allow setting string or ObjectID for ref relation in DocumentDefinition<T> #9676
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Do you want to request a feature or report a bug?
Feature request (no rush)
What is the current behavior?
Setting relation value with string or ObjectID not allowed in all methods using
DocumentDefinition<T>
such asModel.create
,Model.findByIdAndUpdate
.If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Should allowed since its allowed in JS version
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
Mongoose 5.11.5
The text was updated successfully, but these errors were encountered: