withRelations method

  1. @override
QueryBuilderInterface<T> withRelations(
  1. List relations
)
override

Eagerly loads relations for the query.

final users = await UserModel.q<UserModel>()
  .withRelations(['posts'])
  .get();

Implementation

@override
QueryBuilderInterface<T> withRelations(List relations) {
  _with.addAll(relations.map((e) => e.toString()));
  return this;
}