Skip to content

Commit 147c8b2

Browse files
authored
Merge pull request #24 from RubenMaier/patch-1
fix in documentation
2 parents 3f41c5c + a796caa commit 147c8b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ const repository = connection.getRepository(MerchantRepository); // That extends
147147

148148
const advert = new AdvertEntity();
149149

150-
const parent = new MerchantEntity();
151-
merchant.adverts= [advert];
150+
const merchant = new MerchantEntity();
151+
merchant.adverts = [advert];
152152

153153
await repository.save(merchant);
154154
```
@@ -181,7 +181,7 @@ extends typeorm's Repository.create method
181181
const repository = connection.getRepository(AdvertRepository); // That extends AbstractPolymorphicRepository
182182

183183
const results = await repository.create({
184-
owner: new UserEntity, // or MerchantEntity
184+
owner: new UserEntity(), // or MerchantEntity()
185185
});
186186
```
187187

0 commit comments

Comments
 (0)