mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
another bulletproofing for schemaless baking
This commit is contained in:
parent
d2514f34c0
commit
adf73abb07
1 changed files with 5 additions and 1 deletions
|
@ -669,7 +669,11 @@ class ModelTask extends BakeTask {
|
|||
$className = $this->in(__d('cake_console', 'What className will %s use?', $alias), null, $alias );
|
||||
|
||||
if ($assocType == 0) {
|
||||
$showKeys = $possibleKeys[$model->table];
|
||||
if (!empty($possibleKeys[$model->table])) {
|
||||
$showKeys = $possibleKeys[$model->table];
|
||||
} else {
|
||||
$showKeys = null;
|
||||
}
|
||||
$suggestedForeignKey = $this->_modelKey($alias);
|
||||
} else {
|
||||
$otherTable = Inflector::tableize($className);
|
||||
|
|
Loading…
Add table
Reference in a new issue