Browse files

Be more semantic indicating that association fields must be empty.

  • Loading branch information...
1 parent 99c8503 commit 8355d32bb1c9ff155a78a926df2a21c0c008cbbf @bar bar committed Dec 20, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Cake/Model/Datasource/DboSource.php
View
6 lib/Cake/Model/Datasource/DboSource.php
@@ -1046,11 +1046,11 @@ public function read(Model $Model, $queryData = array(), $recursive = null) {
$Model->recursive = $recursive;
}
- $bypass = false;
if (!empty($queryData['fields'])) {
- $bypass = true;
+ $noAssocFields = true;
$queryData['fields'] = $this->fields($Model, null, $queryData['fields']);
} else {
+ $noAssocFields = false;
$queryData['fields'] = $this->fields($Model);
}
@@ -1076,7 +1076,7 @@ public function read(Model $Model, $queryData = array(), $recursive = null) {
continue;
}
- if ($bypass) {
+ if ($noAssocFields) {
$assocData['fields'] = false;
}

0 comments on commit 8355d32

Please sign in to comment.