relation library

Classes

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

Enums

RelationType

Functions

belongsTo<Parent extends RelationalModel<Parent>, Child extends RelationalModel<Child>>(RelationalModel<Child> child, String foreignKey, [String? ownerKey, RelationScope? scope]) Relation<Parent, Child>
belongsToMany<Parent extends RelationalModel<Parent>, Child extends RelationalModel<Child>>(RelationalModel<Child> child, String pivotTable, String pivotForeignKey, String pivotRelatedKey, [RelationScope? scope]) Relation<Parent, Child>
hasMany<Parent extends RelationalModel<Parent>, Child extends RelationalModel<Child>>(RelationalModel<Child> child, String foreignKey, [String? localKey, RelationScope? scope]) Relation<Parent, Child>
hasOne<Parent extends RelationalModel<Parent>, Child extends RelationalModel<Child>>(RelationalModel<Child> child, String foreignKey, [String? localKey, RelationScope? scope]) Relation<Parent, Child>
morphMany<Parent extends RelationalModel<Parent>, Child extends RelationalModel<Child>>(RelationalModel<Child> child, String foreignKey, String typeColumn, String typeValue, [String? localKey, RelationScope? scope]) Relation<Parent, Child>
morphOne<Parent extends RelationalModel<Parent>, Child extends RelationalModel<Child>>(RelationalModel<Child> child, String foreignKey, String typeColumn, String typeValue, [String? localKey, RelationScope? scope]) Relation<Parent, Child>
morphTo<Parent extends RelationalModel<Parent>>(String typeColumn, String uuidColumn, Map<String, RelationalModel<RelationalModel>> map) Relation<Parent, dynamic>