* Create (and flush) multiple entities * @param amount Number of entities that should be generated * @param input Object specifying what default attributes of the entity factory should be overridden
(amount: number, input?: TInput)
| 67 | * @param input Object specifying what default attributes of the entity factory should be overridden |
| 68 | */ |
| 69 | async create(amount: number, input?: TInput): Promise<TEntity[]> { |
| 70 | const entities = this.make(amount, input); |
| 71 | await this.em.flush(); |
| 72 | return entities; |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Set a function that is applied to each entity before it is returned |