intermediate

TypeORM

Use TypeORM entities, repositories, migrations, and query builder with awareness of decorator metadata and loading behavior.

TypeORM interviews cover decorator entities, repositories, migrations, and query builder escape hatches. Familiar to many Node codebases but requires care around lazy loading, transactions, and generated migrations.

Subtopics: entities, repositories, migrations, query builder.

On interviews: explain entity relations, transactional EntityManager usage, and when repository helpers are insufficient.

Common pitfalls: `synchronize` in production; lazy relations in serializers; repository calls outside active transactions.

The trade-off is rapid entity mapping versus hidden query and migration risks.

Checklist:

  • Map constraints and indexes explicitly.
  • Use transactional managers in units of work.
  • Review generated migration SQL.
  • Drop to query builder for complex reads.