This commit is contained in:
parent
6b86c9fa47
commit
54fcf19fdc
@ -295,13 +295,20 @@ class Doctrine_Hydrate
|
||||
|
||||
return $this;
|
||||
}
|
||||
public function getDeclaration($name)
|
||||
/**
|
||||
* getAliasDeclaration
|
||||
* get the declaration for given component alias
|
||||
*
|
||||
* @param string $componentAlias the component alias the retrieve the declaration from
|
||||
* @return array the alias declaration
|
||||
*/
|
||||
public function getAliasDeclaration($componentAlias)
|
||||
{
|
||||
if ( ! isset($this->_aliasMap[$name])) {
|
||||
throw new Doctrine_Hydrate_Exception('Unknown component alias ' . $name);
|
||||
if ( ! isset($this->_aliasMap[$componentAlias])) {
|
||||
throw new Doctrine_Hydrate_Exception('Unknown component alias ' . $componentAlias);
|
||||
}
|
||||
|
||||
return $this->_aliasMap[$name];
|
||||
return $this->_aliasMap[$componentAlias];
|
||||
}
|
||||
/**
|
||||
* setQueryPart
|
||||
@ -364,6 +371,7 @@ class Doctrine_Hydrate
|
||||
}
|
||||
/**
|
||||
* limitSubqueryUsed
|
||||
* whether or not limit subquery was used
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
@ -485,10 +493,25 @@ class Doctrine_Hydrate
|
||||
{
|
||||
return $params;
|
||||
}
|
||||
public function setAliasMap($map)
|
||||
/**
|
||||
* setAliasMap
|
||||
* sets the whole component alias map
|
||||
*
|
||||
* @param array $map alias map
|
||||
* @return Doctrine_Hydrate this object
|
||||
*/
|
||||
public function setAliasMap(array $map)
|
||||
{
|
||||
$this->_aliasMap = $map;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* getAliasMap
|
||||
* returns the component alias map
|
||||
*
|
||||
* @return array component alias map
|
||||
*/
|
||||
public function getAliasMap()
|
||||
{
|
||||
return $this->_aliasMap;
|
||||
|
@ -46,7 +46,7 @@ class Doctrine_Query_JoinCondition extends Doctrine_Query_Condition
|
||||
$value = $e[2];
|
||||
|
||||
$alias = $this->query->getTableAlias($reference);
|
||||
$map = $this->query->getDeclaration($reference);
|
||||
$map = $this->query->getAliasDeclaration($reference);
|
||||
$table = $map['table'];
|
||||
// check if value is enumerated value
|
||||
$enumIndex = $table->enumIndex($field, trim($value, "'"));
|
||||
|
@ -46,8 +46,7 @@ class Doctrine_Query_Set extends Doctrine_Query_Part
|
||||
$reference = implode('.', $e);
|
||||
|
||||
$alias = $this->query->getTableAlias($reference);
|
||||
|
||||
$map = $this->query->getDeclaration($reference);
|
||||
$map = $this->query->getAliasDeclaration($reference);
|
||||
|
||||
$result[] = $map['table']->getColumnName($field) . ' = ' . $set[1];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user