MorphedByMany class

Inheritance

Constructors

MorphedByMany({required Model parent, required Model related, required String morphKey, required String morphType, required String? pivotTable, required String? relatedMorphKey, String? type, String localKey = 'id'})

Properties

foreignKey String?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
localKey String
getter/setter pairinherited
morphKey String
finalinherited
morphType String
finalinherited
parent Model
finalinherited
parentForeignKey String
The conventional foreign key pointing at the parent, used when the relation was declared without an explicit foreignKey.
no setterinherited
pivotTable String?
finalinherited
finalinherited
relatedMorphKey String?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String?
finalinherited

Methods

match(List<Map<String, dynamic>> models, List<Map<String, dynamic>> results, String relation) List<Map<String, dynamic>>
override
matchMany(List<Map<String, dynamic>> models, List<Map<String, dynamic>> results, String relation, String parentKey, String relatedKey) List<Map<String, dynamic>>
Match many related models to parents (for normal relations)
inherited
matchMorphMany(List<Map<String, dynamic>> models, List<Map<String, dynamic>> results, String relation, String parentKey, String relatedIdKey, String typeKey, String expectedType) List<Map<String, dynamic>>
Match many related morph models to parents. Only includes results where the morph type (at column typeKey) equals expectedType.
inherited
matchMorphOneOrMany(List<Map<String, dynamic>> models, List<Map<String, dynamic>> results, String relation, String parentKey, String relatedIdKey, String typeKey, String expectedType) List<Map<String, dynamic>>
Match one related morph model to parents (for hasOne polymorphic relation). Only includes results where typeKey equals expectedType and returns only the first matching result.
inherited
matchMorphToOne(List<Map<String, dynamic>> parents, List<Map<String, dynamic>> results, String relation, String morphKey, String relatedKey) List<Map<String, dynamic>>
inherited
matchOneOrMany(List<Map<String, dynamic>> models, List<Map<String, dynamic>> results, String relation, String parentKey, String relatedKey) List<Map<String, dynamic>>
inherited
matchToMany(List<Map<String, dynamic>> parents, List<Map<String, dynamic>> results, String relation, String parentLocalKey, String parentPivotKey, String relatedPivotKey, {List<String> pivotFields = const []}) List<Map<String, dynamic>>
inherited
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