Games TypeORM Relation Map

Relation Map

relations, eager, the N+1 trap, load strategies, cascade, ManyToOne and onDelete: count the SQL behind every relation.

0 / 8 levels · 0 / 24 ★Start playing ›
  1. Relation Map

    Related rows are rooms down the hall. TypeORM never walks down the hall unless you tell it to with relations, always walks for eager ones, and a loop that walks once per row is the N+1 trap: one trip for the list, then one more for every row.

Your rulebook

Finish a level to add its rule. Fill the book and you can explain all of this in an interview.

  1. 1Finish Relations stay down the hall to unlock this rule.
  2. 2Finish relations: walk down the hall to unlock this rule.
  3. 3Finish Eager always walks to unlock this rule.
  4. 4Finish The N+1 trap to unlock this rule.
  5. 5Finish Separate queries, not one per row to unlock this rule.
  6. 6Finish Cascade carries the children to unlock this rule.
  7. 7Finish Saving with an author object to unlock this rule.
  8. 8Finish onDelete: the database clears the hall to unlock this rule.