Error checking for naming collisions
This commit is contained in:
parent
d3b6acfff0
commit
9828081533
@ -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])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user