MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / create

Function create

packages/seeder/src/Factory.ts:69–73  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected