Relations

A type can refer to another type using a relation field, which acts like a foreign key. There are three types of relations:

  • one-to-one relation
  • one-to-many relation
  • many-to-many.