Commit ac6e3b6e authored by Steve Müller's avatar Steve Müller

rename exception method

parent 3c97fc1e
...@@ -1150,7 +1150,7 @@ class QueryBuilder ...@@ -1150,7 +1150,7 @@ class QueryBuilder
if (isset($this->sqlParts['join'][$fromAlias])) { if (isset($this->sqlParts['join'][$fromAlias])) {
foreach ($this->sqlParts['join'][$fromAlias] as $join) { foreach ($this->sqlParts['join'][$fromAlias] as $join) {
if (array_key_exists($join['joinAlias'], $knownAliases)) { if (array_key_exists($join['joinAlias'], $knownAliases)) {
throw QueryException::notUniqueAlias($join['joinAlias'], $knownAliases); throw QueryException::nonUniqueAlias($join['joinAlias'], $knownAliases);
} }
$sql .= ' ' . strtoupper($join['joinType']) $sql .= ' ' . strtoupper($join['joinType'])
. ' JOIN ' . $join['joinTable'] . ' ' . $join['joinAlias'] . ' JOIN ' . $join['joinTable'] . ' ' . $join['joinAlias']
......
...@@ -38,14 +38,14 @@ class QueryException extends DBALException ...@@ -38,14 +38,14 @@ class QueryException extends DBALException
"any FROM or JOIN clause table. The currently registered " . "any FROM or JOIN clause table. The currently registered " .
"aliases are: " . implode(", ", $registeredAliases) . "."); "aliases are: " . implode(", ", $registeredAliases) . ".");
} }
/** /**
* @param string $alias * @param string $alias
* @param array $registeredAliases * @param array $registeredAliases
* *
* @return \Doctrine\DBAL\Query\QueryException * @return \Doctrine\DBAL\Query\QueryException
*/ */
static public function notUniqueAlias($alias, $registeredAliases) static public function nonUniqueAlias($alias, $registeredAliases)
{ {
return new self("The given alias '" . $alias . "' is not unique " . return new self("The given alias '" . $alias . "' is not unique " .
"in FROM and JOIN clause table. The currently registered " . "in FROM and JOIN clause table. The currently registered " .
......
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