Permalink
Browse files

Making ViewTask always refresh model schema so baked views reflect cu…

…rrent schema.
  • Loading branch information...
1 parent ec88bd9 commit 31fff5e390a6566e222ca2dad46d4a5e23b2734a @markstory markstory committed Dec 30, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/console/libs/tasks/view.php
@@ -283,7 +283,7 @@ function __loadController() {
$displayField = $modelObj->displayField;
$singularVar = Inflector::variable($modelClass);
$singularHumanName = $this->_singularHumanName($modelClass);
- $schema = $modelObj->schema();
+ $schema = $modelObj->schema(true);
$fields = array_keys($schema);
$associations = $this->__associations($modelObj);
} else {
@@ -469,7 +469,7 @@ function __associations(&$model) {
$associations[$type][$assocKey]['displayField'] = $model->{$assocKey}->displayField;
$associations[$type][$assocKey]['foreignKey'] = $assocData['foreignKey'];
$associations[$type][$assocKey]['controller'] = Inflector::pluralize(Inflector::underscore($assocData['className']));
- $associations[$type][$assocKey]['fields'] = array_keys($model->{$assocKey}->schema());
+ $associations[$type][$assocKey]['fields'] = array_keys($model->{$assocKey}->schema(true));
}
}
return $associations;

0 comments on commit 31fff5e

Please sign in to comment.