HasOneOrMany<Related extends KhademModel<Related> , Parent> class
abstract
- Inheritance
- Implementers
Constructors
-
HasOneOrMany(QueryBuilderInterface<
Related> query, Parent parent, String foreignKey, String localKey)
Properties
- foreignKey → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- localKey → String
-
final
- parent → Parent
-
The parent model instance.
finalinherited
-
query
→ QueryBuilderInterface<
Related> -
The query builder instance.
finalinherited
-
The related model factory.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addConstraints(
) → void -
Set the base constraints on the relation query.
override
-
addEagerConstraints(
List< KhademModel> models) → void -
Set the constraints for an eager load of the relation.
override
-
getQuery(
) → QueryBuilderInterface< Related> -
Get the query builder for the relation.
inherited
-
getRelationExistenceQuery(
QueryBuilderInterface< Related> query, QueryBuilderInterface<Parent> parentQuery, [List<String> columns = const ['*']]) → QueryBuilderInterface<Related> -
Add the constraints for a relationship count query.
override
-
getResults(
) → Future -
Get the results of the relationship.
inherited
-
initRelation(
List< KhademModel> models, String relation) → List<KhademModel> -
Initialize the relation on a set of models.
inherited
-
match(
List< KhademModel> models, List<Related> results, String relation) → List<KhademModel> -
Match the eagerly loaded results to their parents.
inherited
-
matchOneOrMany(
List< KhademModel> models, List<Related> results, String relation, String type) → List<KhademModel> - Match the eagerly loaded results to their parents.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBase(
) → QueryBuilderInterface< Related> -
Get the underlying query builder.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited