mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Making ViewTask always refresh model schema so baked views reflect current schema.
This commit is contained in:
parent
ec88bd9c8c
commit
31fff5e390
1 changed files with 2 additions and 2 deletions
|
@ -283,7 +283,7 @@ class ViewTask extends Shell {
|
|||
$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 @@ class ViewTask extends Shell {
|
|||
$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;
|
||||
|
|
Loading…
Add table
Reference in a new issue