This commit is contained in:
parent
a9817a03d5
commit
24abb16c75
@ -79,6 +79,8 @@ class Doctrine_Hook
|
|||||||
$this->query->parseQuery($query);
|
$this->query->parseQuery($query);
|
||||||
} elseif ($query instanceof Doctrine_Query) {
|
} elseif ($query instanceof Doctrine_Query) {
|
||||||
$this->query = $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);
|
$tableAlias = $this->query->getTableAlias($alias);
|
||||||
$table = $this->query->getTable($tableAlias);
|
$table = $this->query->getTable($tableAlias);
|
||||||
|
|
||||||
|
if ( ! $table) {
|
||||||
|
throw new Doctrine_Exception('Unknown table alias ' . $tableAlias);
|
||||||
|
}
|
||||||
|
|
||||||
if ($def = $table->getDefinitionOf($column)) {
|
if ($def = $table->getDefinitionOf($column)) {
|
||||||
if (isset($this->typeParsers[$def[0]])) {
|
if (isset($this->typeParsers[$def[0]])) {
|
||||||
$name = $this->typeParsers[$def[0]];
|
$name = $this->typeParsers[$def[0]];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user