Skip to content

Commit

Permalink
Renaming _resolveFirstLevel to _resolveJoins
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 11, 2013
1 parent b5d05c1 commit 2f1b843
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/ORM/Query.php
Expand Up @@ -438,7 +438,7 @@ protected function _addContainments() {
}
}

foreach ($this->_resolveFirstLevel($this->_table, $contain) as $options) {
foreach ($this->_resolveJoins($this->_table, $contain) as $options) {
$table = $options['instance']->target();
$alias = $table->alias();
$this->_addJoin($options['instance'], $options['config']);
Expand Down Expand Up @@ -491,13 +491,13 @@ protected function _normalizeContain(Table $parent, $alias, $options) {
* @param array $associations list of associations for $source
* @return array
*/
protected function _resolveFirstLevel($source, $associations) {
protected function _resolveJoins($source, $associations) {
$result = [];
foreach ($associations as $table => $options) {
$associated = $options['instance'];
if ($associated && $associated->canBeJoined($options['config'])) {
$result[$table] = $options;
$result += $this->_resolveFirstLevel($associated->target(), $options['associations']);
$result += $this->_resolveJoins($associated->target(), $options['associations']);
}
}
return $result;
Expand Down

0 comments on commit 2f1b843

Please sign in to comment.