MssqlMorph class
How a polymorphic relation finds its other side.
SQL Server cannot express one of these as a foreign key — a column pointing at several tables cannot be constrained — so it is declared rather than discovered. That is not a limitation of this package; it is what makes the pattern polymorphic.
- Annotations
-
- @immutable
Constructors
-
MssqlMorph({required String typeColumn, required String idColumn, String? typeValue, MssqlMorphUnknown unknown = MssqlMorphUnknown.error, Map<
String, MssqlTableBinding< targets = const <String, MssqlTableBinding<Object?>>{}})Object?> >
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- idColumn → String
-
The column holding the other side's key.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
targets
→ Map<
String, MssqlTableBinding< Object?> > -
For MssqlRelationKind.morphTo: which table each type name denotes.
final
- typeColumn → String
-
The column holding the other side's type name.
final
- typeValue → String?
-
For MssqlRelationKind.morphOne and MssqlRelationKind.morphMany: the
value that means "this table".
final
- unknown → MssqlMorphUnknown
-
What to do with a discriminator the targets map does not name.
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