Relationship class abstract
Base class for relationship annotations between two models.
- Implementers
Constructors
- Relationship({required dynamic model, required String foreignKey, String localKey = 'id', String? onDelete, String? onUpdate})
-
Creates a relationship with the given model and key columns.
const
Properties
- foreignKey → String
-
The foreign-key column of the relationship.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCollection → bool
-
True if the relationship returns a collection of models.
no setter
- localKey → String
-
The local key column this relationship joins on.
final
- model → dynamic
-
The target model for the relationship.
Can be a String (table name) or a Type (Model class).
final
- onDelete → String?
-
Action applied when the referenced record is deleted.
final
- onUpdate → String?
-
Action applied when the referenced record is updated.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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