1
0
mirror of synced 2025-01-31 12:32:59 +03:00
This commit is contained in:
zYne 2007-03-16 22:17:32 +00:00
parent a9817a03d5
commit 24abb16c75

View File

@ -79,6 +79,8 @@ class Doctrine_Hook
$this->query->parseQuery($query);
} elseif ($query instanceof Doctrine_Query) {
$this->query = $query;
} else {
throw new Doctrine_Exception('Constructor argument should be either Doctrine_Query object or valid DQL query');
}
}
/**
@ -132,6 +134,10 @@ class Doctrine_Hook
$tableAlias = $this->query->getTableAlias($alias);
$table = $this->query->getTable($tableAlias);
if ( ! $table) {
throw new Doctrine_Exception('Unknown table alias ' . $tableAlias);
}
if ($def = $table->getDefinitionOf($column)) {
if (isset($this->typeParsers[$def[0]])) {
$name = $this->typeParsers[$def[0]];