function ForeignKey::validate
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Database/SchemaDefinition/ForeignKey.php \Drupal\Core\Database\SchemaDefinition\ForeignKey::validate()
Validates the properties of the value object.
Throws
\Drupal\Core\Database\Exception\SchemaDefinitionException
1 call to ForeignKey::validate()
- ForeignKey::__construct in core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ ForeignKey.php - Constructor.
File
-
core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ ForeignKey.php, line 54
Class
- ForeignKey
- Describes a database foreign key.
Namespace
Drupal\Core\Database\SchemaDefinitionCode
private function validate() : void {
if (count($this->columns) !== count($this->foreignColumns)) {
throw new SchemaDefinitionException("Mismatching count of columns for the '{$this->name}' foreign key");
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.