@ -54,7 +54,12 @@ This function creates a new Mongoose model with schema. Example usage:
|
|||||||
| `hooks` | [`(schema: Schema<T>) => void`](https://mongoosejs.com/docs/middleware.html) | false | Schema Hooks Function to customize Model |
|
| `hooks` | [`(schema: Schema<T>) => void`](https://mongoosejs.com/docs/middleware.html) | false | Schema Hooks Function to customize Model |
|
||||||
|
|
||||||
|
|
||||||
|
::alert
|
||||||
|
you can access the default connection with importing it from mongoose:
|
||||||
|
::
|
||||||
|
```
|
||||||
|
import { connection } from 'mongoose'
|
||||||
|
```
|
||||||
|
|
||||||
## `defineMongooseConnection`
|
## `defineMongooseConnection`
|
||||||
This function creates a new Mongoose connection.
|
This function creates a new Mongoose connection.
|
||||||
|
|||||||
Reference in New Issue
Block a user