Skip to content

Commit

Permalink
Rename joined to _joined to hopefully prevent issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 28, 2012
1 parent 364c293 commit 115b2c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -1113,7 +1113,7 @@ public function read(Model $model, $queryData = array(), $recursive = null) {

if (isset($db) && method_exists($db, 'queryAssociation')) {
$stack = array($assoc);
$stack['joined'] = $joined;
$stack['_joined'] = $joined;
$db->queryAssociation($model, $linkModel, $type, $assoc, $assocData, $array, true, $resultSet, $model->recursive - 1, $stack);
unset($db);

Expand Down Expand Up @@ -1182,9 +1182,9 @@ protected function _filterResults(&$results, Model $model, $filtered = array())
* @throws CakeException when results cannot be created.
*/
public function queryAssociation(Model $model, &$linkModel, $type, $association, $assocData, &$queryData, $external, &$resultSet, $recursive, $stack) {
if (isset($stack['joined'])) {
$joined = $stack['joined'];
unset($stack['joined']);
if (isset($stack['_joined'])) {
$joined = $stack['_joined'];
unset($stack['_joined']);
}

if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) {
Expand Down

0 comments on commit 115b2c1

Please sign in to comment.