Closed Sarvesh67 closed 4 years ago
What to do? Set up custom queries for a given table and its relationships and add it to a file. Define relevant queries and then export them for use in controllers.
Where should the files be located? src/repositories/
Prerequistes
Link for resources https://typeorm.io/#/working-with-repository/ https://github.com/w3tecch/express-typescript-boilerplate/tree/develop/src/api/repositories https://github.com/jverhoelen/node-express-typescript-boilerplate/blob/master/service/server/cats/CatRepository.ts
What to do? Set up custom queries for a given table and its relationships and add it to a file. Define relevant queries and then export them for use in controllers.
Where should the files be located? src/repositories/
Prerequistes
44
Link for resources https://typeorm.io/#/working-with-repository/ https://github.com/w3tecch/express-typescript-boilerplate/tree/develop/src/api/repositories https://github.com/jverhoelen/node-express-typescript-boilerplate/blob/master/service/server/cats/CatRepository.ts