1
0
mirror of synced 2025-01-06 00:57:10 +03:00
This commit is contained in:
zYne 2007-06-19 10:15:44 +00:00
parent 7aa35b7b8e
commit 6ff9ee9124

View File

@ -130,7 +130,7 @@ class Doctrine_Hook
if (count($e) == 2) { if (count($e) == 2) {
list($alias, $column) = $e; list($alias, $column) = $e;
/**
$tableAlias = $this->query->getTableAlias($alias); $tableAlias = $this->query->getTableAlias($alias);
$map = $this->query->getAliasDeclaration($alias); $map = $this->query->getAliasDeclaration($alias);
$table = $map['table']; $table = $map['table'];
@ -140,6 +140,8 @@ class Doctrine_Hook
} }
if ($def = $table->getDefinitionOf($column)) { if ($def = $table->getDefinitionOf($column)) {
*/
$def[0] = gettype($value);
if (isset($this->typeParsers[$def[0]])) { if (isset($this->typeParsers[$def[0]])) {
$name = $this->typeParsers[$def[0]]; $name = $this->typeParsers[$def[0]];
$parser = new $name; $parser = new $name;
@ -148,7 +150,7 @@ class Doctrine_Hook
$parser->parse($alias, $column, $value); $parser->parse($alias, $column, $value);
$this->query->addWhere($parser->getCondition(), $parser->getParams()); $this->query->addWhere($parser->getCondition(), $parser->getParams());
} //}
} }
} }
@ -180,14 +182,15 @@ class Doctrine_Hook
if (count($e) == 2) { if (count($e) == 2) {
list($alias, $column) = $e; list($alias, $column) = $e;
/**
$tableAlias = $this->query->getTableAlias($alias); $tableAlias = $this->query->getTableAlias($alias);
$map = $this->query->getAliasDeclaration($alias); $map = $this->query->getAliasDeclaration($alias);
$table = $map['table']; $table = $map['table'];
if ($def = $table->getDefinitionOf($column)) { if ($def = $table->getDefinitionOf($column)) {
*/
$this->query->addOrderBy($alias . '.' . $column . ' ' . $order); $this->query->addOrderBy($alias . '.' . $column . ' ' . $order);
} //}
} }
} }
return true; return true;