diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php index 37eb5c426..dd1243b91 100644 --- a/lib/Cake/Model/Behavior/TranslateBehavior.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -147,11 +147,14 @@ class TranslateBehavior extends ModelBehavior { if (empty($query['fields'])) { $addFields = $fields; } elseif (is_array($query['fields'])) { + $isAllFields = ( + in_array($Model->alias . '.' . '*', $query['fields']) || + in_array($Model->escapeField('*'), $query['fields']) + ); foreach ($fields as $key => $value) { $field = (is_numeric($key)) ? $value : $key; - if ( - in_array($Model->escapeField('*'), $query['fields']) || + $isAllFields || in_array($Model->alias . '.' . $field, $query['fields']) || in_array($field, $query['fields']) ) {