Skip to content

Commit 94990a4

Browse files
Fix entity import
The entity should be imported manually, as the manual states.
1 parent 9be489d commit 94990a4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sample/13-mongo-typeorm/src/app.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ import { Module } from '@nestjs/common';
22
import { TypeOrmModule } from '@nestjs/typeorm';
33
import { join } from 'path';
44
import { PhotoModule } from './photo/photo.module';
5+
import { Photo } from './photo/photo.entity';
56

67
@Module({
78
imports: [
89
TypeOrmModule.forRoot({
910
type: 'mongodb',
1011
host: 'localhost',
1112
database: 'test',
12-
entities: [join(__dirname, '**/**.entity{.ts,.js}')],
13+
entities: [Photo],
1314
synchronize: true,
1415
}),
1516
PhotoModule,

0 commit comments

Comments
 (0)