1
0
mirror of synced 2025-01-17 22:11:41 +03:00

Fixed #626. Reopening the ticket for further issues is fine.

This commit is contained in:
romanb 2007-12-03 18:37:39 +00:00
parent 806e9c63e6
commit a143caefe3

View File

@ -1673,11 +1673,11 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable, Seria
}
if ($indexBy !== null) {
if ( ! $table->hasColumn($indexBy)) {
if ( ! $table->hasColumn($table->getColumnName($indexBy))) {
throw new Doctrine_Query_Exception("Couldn't use key mapping. Column " . $indexBy . " does not exist.");
}
$this->_queryComponents[$componentAlias]['map'] = $table->getColumnName($indexBy);
$this->_queryComponents[$componentAlias]['map'] = $indexBy;
}
return $this->_queryComponents[$componentAlias];
}