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

Function createOne

packages/seeder/src/Factory.ts:58–62  ·  view source on GitHub ↗

* Create (and flush) a single entity * @param input Object specifying what default attributes of the entity factory should be overridden

(input?: TInput)

Source from the content-addressed store, hash-verified

56 * @param input Object specifying what default attributes of the entity factory should be overridden
57 */
58 async createOne(input?: TInput): Promise<TEntity> {
59 const entity = this.makeOne(input);
60 await this.em.flush();
61 return entity;
62 }
63
64 /**
65 * Create (and flush) multiple entities

Callers

nothing calls this directly

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected