Commit 98280815 authored by zYne's avatar zYne

Error checking for naming collisions

parent d3b6acff
......@@ -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])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment