without method

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

Excludes specific relations from the model's defaultRelations.

This is useful when you want to load most default relations but skip specific ones for performance.

// Model has defaultRelations: ['posts', 'profile', 'roles']
final users = await UserModel.q<UserModel>()
  .without(['posts', 'roles'])  // Only loads 'profile'
  .get();

Implementation

@override
QueryBuilderInterface<T> without(List<String> relations) {
  _without.addAll(relations);
  return this;
}