MssqlRelationThrough class

The middle table of a MssqlRelationKind.belongsToMany, MssqlRelationKind.hasManyThrough or MssqlRelationKind.morphToMany.

Loading through one costs two queries per relation instead of one: the pivot is read for the parents' keys, then the target for the pivot's. Still a fixed number, still no N+1.

Annotations
  • @immutable

Constructors

MssqlRelationThrough({required MssqlTableBinding<Object?> binding, required List<String> nearColumns, required List<String> farColumns, String? typeColumn, String? typeValue})

Properties

binding MssqlTableBinding<Object?>
The pivot or intermediate table.
final
farColumns List<String>
Columns on the middle table matching the target's foreign columns.
final
hashCode int
The hash code for this object.
no setterinherited
nearColumns List<String>
Columns on the middle table matching the parent's local columns.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeColumn String?
For a polymorphic pivot, the column naming the parent's type…
final
typeValue String?
…and the value that means this parent table.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited