1
0
mirror of synced 2025-01-18 22:41:43 +03:00

Error checking for naming collisions

This commit is contained in:
zYne 2007-02-06 19:06:17 +00:00
parent d3b6acfff0
commit 9828081533

View File

@ -751,7 +751,14 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
if (isset($this->relations[$name])) {
unset($this->relations[$name]);
}
$e = explode(" as ",$name);
$lower = strtolower($name);
if (isset($this->columns[$lower])) {
throw new Doctrine_Table_Exception('Column name with ' . $lower . ' already exists!');
}
$e = explode(' as ', $name);
$name = $e[0];
if (isset($e[1])) {