This commit is contained in:
parent
ff1886754d
commit
647542d5ee
@ -661,4 +661,15 @@ class Doctrine_Expression extends Doctrine_Connection_Module
|
||||
{
|
||||
throw new Doctrine_Expression_Exception('method not implemented');
|
||||
}
|
||||
/**
|
||||
* __call
|
||||
*
|
||||
* for all native RDBMS functions the function name itself is returned
|
||||
*/
|
||||
public function __call($m, $a)
|
||||
{
|
||||
if ($this->conn->getAttribute(Doctrine::ATTR_PORTABILITY) & Doctrine::PORTABILITY_EXPR) {
|
||||
throw new Doctrine_Expression_Exception('Unknown expression ' . $m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -235,9 +235,7 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
|
||||
$pos = strpos($func, '(');
|
||||
$name = substr($func, 0, $pos);
|
||||
|
||||
|
||||
if(method_exists($this->conn->expression, $name)) {
|
||||
|
||||
try {
|
||||
$argStr = substr($func, ($pos + 1), -1);
|
||||
$args = explode(',', $argStr);
|
||||
|
||||
@ -279,8 +277,8 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
|
||||
}
|
||||
|
||||
$this->pendingAggregates[$owner][] = array($name, $args, $distinct, $alias);
|
||||
} else {
|
||||
throw new Doctrine_Query_Exception('Unknown function '.$name);
|
||||
} catch(Doctrine_Expression_Exception $e) {
|
||||
throw new Doctrine_Query_Exception('Unknown function ' . $func . '.');
|
||||
}
|
||||
}
|
||||
public function processPendingSubqueries()
|
||||
|
Loading…
Reference in New Issue
Block a user