TrilonIO / nest-data-source-agnostic

Example repository where we implement data source agnostic services with NestJS.
https://trilon.io/blog/implementing-data-source-agnostic-services-with-nestjs
23 stars 3 forks source link

Entities and Models are mixed up #2

Open alper opened 7 months ago

alper commented 7 months ago

You have a folder called /models/ here where you have classes that are annotated as @Entity()?

https://github.com/TrilonIO/nest-data-source-agnostic/blob/main/src/countries/models/country.model.ts

Shouldn't those go into the folder called entities/?

alper commented 7 months ago

Having these be classes with the same name also lost me a ridiculous amount of time with the TypeORM integration, detailed here: https://github.com/typeorm/typeorm/issues/10558#issuecomment-1950007654

alper commented 7 months ago

Here's my repository derived from your tutorial: https://github.com/alper/nestjs-sample