RelationDescriptor class
A type-level, instance-free description of a single relationship.
Lets adapters (e.g. a Drift/SQL adapter) traverse a relation chain such as
debt.lenderGroup.members.person to build joins, without needing a fetched
entity instance (whose relation.value may still be null). See issue #21.
Constructors
- RelationDescriptor({required String name, required RelationKind kind, required Type targetType, required String foreignKey, required String localKey, Type? pivotType, String? otherForeignKey, String? otherLocalKey})
-
const
Properties
- foreignKey → String
-
The foreign key column (for many-to-many, the pivot's key on this side).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → RelationKind
-
Whether this is a belongsTo / hasMany / hasOne / manyToMany relation.
final
- localKey → String
-
The local key column (for many-to-many, this side's local key).
final
- name → String
-
The relation name (the key in the entity's
relationsmap).final - otherForeignKey → String?
-
The pivot's foreign key on the other side (many-to-many only).
final
- otherLocalKey → String?
-
The other side's local key (many-to-many only).
final
- pivotType → Type?
-
The pivot entity type (many-to-many only).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- targetType → Type
-
The related entity type.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited