Skip to content

Commit e83b115

Browse files
sample(typeorm): use auto load entities option
1 parent 9607b9b commit e83b115

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

sample/05-sql-typeorm/src/app.module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Module } from '@nestjs/common';
22
import { TypeOrmModule } from '@nestjs/typeorm';
3-
import { Photo } from './photo/photo.entity';
43
import { PhotoModule } from './photo/photo.module';
54

65
@Module({
@@ -12,7 +11,7 @@ import { PhotoModule } from './photo/photo.module';
1211
username: 'root',
1312
password: 'root',
1413
database: 'test',
15-
entities: [Photo],
14+
autoLoadEntities: true,
1615
synchronize: true,
1716
}),
1817
PhotoModule,

0 commit comments

Comments
 (0)