updating translate recursive handling, fixes #5593

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7823 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-11-04 01:41:27 +00:00
parent f2823e85d7
commit e2a5f38b36

View file

@ -115,6 +115,7 @@ class TranslateBehavior extends ModelBehavior {
if (empty($query['fields'])) {
$query['fields'] = array($model->alias.'.*');
if ($model->recursive >= 0) {
foreach (array('hasOne', 'belongsTo') as $type) {
foreach ($model->{$type} as $key => $value) {
@ -127,6 +128,7 @@ class TranslateBehavior extends ModelBehavior {
}
}
}
}
$autoFields = true;
}
$fields = array_merge($this->settings[$model->alias], $this->runtime[$model->alias]['fields']);