NestJS - Database with TypeORM
You wrote this TypeORM setup in your NestJS app:
TypeOrmModule.forRoot({
type: 'postgres',
host: 'localhost',
port: 5432,
username: 'user',
password: 'pass',
database: 'testdb',
entities: [User],
synchronize: true
})
But the app crashes with an error: "Entity metadata not found for User". What is the likely cause?