TypeORM Adapter

The TypeormAdapter is used for creating mock data and automatically inserting persisting it to a database.

Installation

npm install --save @entity-factory/core @entity-factory/typeorm

TypeormAdapter([opts])

// use default connection from ormconfig.json
const typeormAdapter = new TypeormAdapter();

// or use any valid typeorm connection options
const typeormAdapter = new TypeormAdapter({
    type: 'sqlite',
    database: ':memory:',
    synchronize: true,
    entities: [Widget],
});

const factory = new EntityFactory({
    adapter: typeormAdapter,
});

Typeorm Blueprint

Available Options None

Last updated

Was this helpful?