|
|
@@ -150,7 +150,14 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
|
|
|
*
|
|
|
* @var string
|
|
|
*/
|
|
|
- const RULES_CLASS = 'Cake\ORM\RulesChecker';
|
|
|
+ const RULES_CLASS = RulesChecker::class;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * The IsUnique class name that is used.
|
|
|
+ *
|
|
|
+ * @var string
|
|
|
+ */
|
|
|
+ const IS_UNIQUE_CLASS = IsUnique::class;
|
|
|
|
|
|
/**
|
|
|
* Name of the table as it can be found in the database
|
|
|
@@ -2797,7 +2804,8 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- $rule = new IsUnique($fields, $options);
|
|
|
+ $class = static::IS_UNIQUE_CLASS;
|
|
|
+ $rule = new $class($fields, $options);
|
|
|
|
|
|
return $rule($entity, ['repository' => $this]);
|
|
|
}
|