isEagerEntityType method

bool isEagerEntityType(
  1. Type entityType, [
  2. bool def = false
])

Returns true if entityType load is eager.

  • def is returned in case there's not rule for entityType.

Implementation

bool isEagerEntityType(Type entityType, [bool def = false]) {
  var allEager = this.allEager;
  if (allEager != null && allEager && !isLazyEntityType(entityType)) {
    return true;
  }

  var eagerEntityTypes = this.eagerEntityTypes;
  if (eagerEntityTypes != null && eagerEntityTypes.contains(entityType)) {
    return true;
  }

  var lazyEntityTypes = this.lazyEntityTypes;
  if (lazyEntityTypes != null && lazyEntityTypes.contains(entityType)) {
    return false;
  }

  return def;
}