Comparison

MasterRecord vs TypeORM

TypeORM models entities with decorators and metadata reflection. MasterRecord uses plain builder methods — no decorators, no experimental flags — with a lambda query language and code-first migrations.

At a glance

Feature by feature

FeatureMasterRecordTypeORM
Entity definitionBuilder methodsDecorators + metadata
Decorators required
experimentalDecorators
Query styleLambda + $$ paramsRepository + QueryBuilder
MigrationsCode-first diffingGenerate + run
Active Record + Data MapperAR + EF stylesAR + Data Mapper
DatabasesSQLite, MySQL, PostgresMany
Pure ESMCJS/ESM with config
Show me the code

The same task, side by side

MasterRecord
MasterRecord
class User {
  id(db)    { db.integer().primary().auto(); }
  name(db)  { db.string(); }
  Posts(db) { db.hasMany('Post'); }
}

const users = await db.User.where((u) => u.name.like($$), 'A%').toList();
TypeORM
TypeORM
@Entity()
class User {
  @PrimaryGeneratedColumn() id: number;
  @Column() name: string;
  @OneToMany(() => Post, (p) => p.user) posts: Post[];
}

const users = await repo.find({ where: { name: Like('A%') } });
The verdict

Which should you choose?

Choose MasterRecord if you prefer decorator-free, plain-class models with code-first migrations and a lambda query language.

Choose TypeORM if you want decorator-based entities and the Data Mapper pattern with a broad database matrix.