mongoose 6.3.1 → 6.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/browser.umd.js +1 -1
- package/lib/connection.js +2 -1
- package/lib/document.js +12 -17
- package/lib/error/cast.js +2 -1
- package/lib/helpers/common.js +0 -8
- package/lib/helpers/immediate.js +3 -1
- package/lib/helpers/isAsyncFunction.js +19 -7
- package/lib/index.js +1 -1
- package/lib/internal.js +0 -1
- package/lib/model.js +7 -2
- package/lib/query.js +2 -1
- package/lib/schema/SubdocumentPath.js +3 -15
- package/lib/schema/documentarray.js +5 -3
- package/lib/schema/number.js +1 -5
- package/lib/schema/objectid.js +2 -4
- package/lib/schema/string.js +1 -5
- package/lib/types/DocumentArray/methods/index.js +8 -0
- package/package.json +21 -18
- package/tsconfig.json +1 -2
- package/types/aggregate.d.ts +1 -2
- package/types/connection.d.ts +2 -3
- package/types/cursor.d.ts +3 -2
- package/types/document.d.ts +14 -11
- package/types/error.d.ts +124 -124
- package/types/index.d.ts +165 -143
- package/types/mongooseoptions.d.ts +1 -2
- package/types/schemaoptions.d.ts +1 -2
package/README.md
CHANGED
|
@@ -153,7 +153,7 @@ The first argument is the _singular_ name of the collection your model is for. *
|
|
|
153
153
|
const MyModel = mongoose.model('Ticket', mySchema);
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
Then
|
|
156
|
+
Then `MyModel` will use the __tickets__ collection, not the __ticket__ collection. For more details read the [model docs](https://mongoosejs.com/docs/api/mongoose.html#mongoose_Mongoose-model).
|
|
157
157
|
|
|
158
158
|
Once we have our model, we can then instantiate it, and save it:
|
|
159
159
|
|