@joakimbugge/typeorm-seeder / create
Function: create()
Call Signature
ts
function create<T>(EntityClass, options?): Promise<T>;Defined in: seed/creator.ts:201
Creates one entity instance in memory without persisting it.
When passed an array of classes, relation seeding is disabled by default (pass relations: true in the context to override). Returns a tuple of instances in the same order as the input array.
Type Parameters
T
T extends object
Parameters
EntityClass
options?
Returns
Promise<T>
Call Signature
ts
function create<T>(EntityClasses, context?): Promise<MapToInstances<T>>;Defined in: seed/creator.ts:205
Creates one entity instance in memory without persisting it.
When passed an array of classes, relation seeding is disabled by default (pass relations: true in the context to override). Returns a tuple of instances in the same order as the input array.
Type Parameters
T
T extends readonly EntityConstructor[]
Parameters
EntityClasses
[...T[]]
context?
Returns
Promise<MapToInstances<T>>