related<TChild> method

MssqlRelationMutation<TRow, TChild> related<TChild>(
  1. TRow parent,
  2. MssqlRelation<TRow, TChild> relation(
    1. TFields fields
    )
)

Writes against one relation of parent.

Generated queries also expose ordersOf(parent) so the relation name is a completed member rather than a callback. The runtime object is the same either way.

Implementation

MssqlRelationMutation<TRow, TChild> related<TChild>(
  TRow parent,
  MssqlRelation<TRow, TChild> Function(TFields fields) relation,
) => MssqlRelationMutation<TRow, TChild>(
  session: session,
  dialect: dialect,
  clock: context.clock,
  parentBinding: binding,
  parent: parent,
  relation: relation(fields),
  scope: state.scope,
  changes: context.changes,
);