From 8355d32bb1c9ff155a78a926df2a21c0c008cbbf Mon Sep 17 00:00:00 2001 From: Ber Clausen Date: Fri, 20 Dec 2013 00:57:38 -0300 Subject: [PATCH] Be more semantic indicating that association fields must be empty. --- lib/Cake/Model/Datasource/DboSource.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 93e5c461f..8d09b6f6f 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -1046,11 +1046,11 @@ class DboSource extends DataSource { $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 @@ class DboSource extends DataSource { continue; } - if ($bypass) { + if ($noAssocFields) { $assocData['fields'] = false; }