Skip to content
Permalink
Browse files

Renaming _resolveFirstLevel to _resolveJoins

  • Loading branch information...
lorenzo committed Jun 11, 2013
1 parent b5d05c1 commit 2f1b84307a5d5e468d184bec42266ad167b3cb12
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Cake/ORM/Query.php
@@ -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']);
@@ -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;

0 comments on commit 2f1b843

Please sign in to comment.
You can’t perform that action at this time.