applyScopes method

QueryBuilder<T> applyScopes()

Applies global scopes once. Called on a clone before compiling.

Implementation

QueryBuilder<T> applyScopes() {
  final def = definition;
  if (_scopesApplied || def == null) return this;
  _scopesApplied = true;
  for (final entry in def.globalScopes.entries) {
    if (!removedScopes.contains(entry.key)) entry.value(this);
  }
  return this;
}