diff --git a/app/src/Model/Table/MatchgridsTable.php b/app/src/Model/Table/MatchgridsTable.php index c20ff99c6..badbbb3e8 100644 --- a/app/src/Model/Table/MatchgridsTable.php +++ b/app/src/Model/Table/MatchgridsTable.php @@ -274,11 +274,8 @@ public function ruleIsUnique($entity, array $options): bool|string { // the table name is not changed if(!$entity->id || $entity->isDirty('table_name')) { - $c = $this->find('all', [ - 'conditions' => [ - 'LOWER(Matchgrids.table_name)' => strtolower($entity->table_name) - ] - ]) + $c = $this->find() + ->where(['LOWER(Matchgrids.table_name)' => strtolower($entity->table_name)]) ->count(); if($c > 0) {