PgJoinToMany<TableType, JoinedTableType> constructor

const PgJoinToMany<TableType, JoinedTableType>({
  1. required PgColumn<TableType, dynamic, dynamic> joinColumn,
  2. required PgTableName<JoinedTableType> joinedTableName,
  3. String? foreignKey,
})

Represents a one-to-many or many-to-many join in a table.

The value type of the generated column will be a list of custom PgModels.

For a many-to-one join or one-to-one join, use PgJoinToOne.

It generates the fancy query pattern and handles the conversion from JSON to a custom PgModel for you.

Implementation

const PgJoinToMany({
  required super.joinColumn,
  required super.joinedTableName,
  super.foreignKey,
});