TypeORM
TypeORM module built with TypeORM
Installation#
Options#
| key | Description | Type | Default |
|---|---|---|---|
id | ModelRepository injection id | string | modelRepository |
config | typeorm connection options | object | {} |
in config/modules/all.ts
Usage#
ModelRepository#
with modelRepository you can access to the typeorm repositories and db connection.
connection#
getter return typeorm connection
getModel#
getModel<T>(model: typeof Schema): Model<T>#
return mongoose model by schema type