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