Relation<Parent extends RelationalModel<Parent>, Child extends RelationalModel<Child>> class

Constructors

Relation({required RelationalModel<Child> child, required RelationType type, required String foreignKey, String? localKey, RelationScope? scope, String? pivotTable, String? pivotForeignKey, String? pivotRelatedKey, String? morphTypeColumn, Map<String, RelationalModel<RelationalModel>>? morphMap})
const

Properties

child → RelationalModel<Child>
final
foreignKey → String
FK on child (hasOne / hasMany) OR FK on parent (belongsTo)
final
hashCode → int
The hash code for this object.
no setterinherited
localKey → String?
Local model key (defaults to model.primaryKey)
final
many → bool
no setter
morphMap → Map<String, RelationalModel<RelationalModel>>?
final
morphTypeColumn → String?
final
pivotForeignKey → String?
final
pivotRelatedKey → String?
final
pivotTable → String?
Pivot metadata
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → RelationScope?
final
type → RelationType
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveLocalKey(Parent parent) → String
If localKey is null → use primaryKey of the Parent model
toString() → String
A string representation of this object.
inherited

Operators

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