@joakimbugge/typeorm-seeder / createMany
Function: createMany()
Call Signature
function createMany<T>(EntityClass, options): Promise<T[]>;Defined in: seed/creator.ts:238
Creates multiple entity instances in memory without persisting them.
When passed an array of classes, returns a tuple of arrays — one per class — each containing count instances. Relation seeding is disabled by default for the array variant; pass relations: true in the options to override.
Type Parameters
T
T extends object
Parameters
EntityClass
options
Returns
Promise<T[]>
Call Signature
function createMany<T>(EntityClasses, options): Promise<MapToInstanceArrays<T>>;Defined in: seed/creator.ts:242
Creates multiple entity instances in memory without persisting them.
When passed an array of classes, returns a tuple of arrays — one per class — each containing count instances. Relation seeding is disabled by default for the array variant; pass relations: true in the options to override.
Type Parameters
T
T extends readonly EntityConstructor[]
Parameters
EntityClasses
[...T[]]
options
Returns
Promise<MapToInstanceArrays<T>>