You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, you can use the callback-style approach with the `transaction` method of the `DataSource` object ([read more](https://typeorm.io/#/transactions/creating-and-using-transactions)).
427
427
428
-
````typescript
428
+
```typescript
429
429
asynccreateMany(users: User[]) {
430
430
awaitthis.dataSource.transaction(asyncmanager=> {
431
431
awaitmanager.save(users[0]);
@@ -461,7 +461,7 @@ export class UserSubscriber implements EntitySubscriberInterface<User> {
461
461
console.log(`BEFORE USER INSERTED: `, event.entity);
462
462
}
463
463
}
464
-
````
464
+
```
465
465
466
466
> error **Warning** Event subscribers can not be [request-scoped](/fundamentals/injection-scopes).
0 commit comments