mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 21:12:41 +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 );
|
$className = $this->in(__d('cake_console', 'What className will %s use?', $alias), null, $alias );
|
||||||
|
|
||||||
if ($assocType == 0) {
|
if ($assocType == 0) {
|
||||||
$showKeys = $possibleKeys[$model->table];
|
if (!empty($possibleKeys[$model->table])) {
|
||||||
|
$showKeys = $possibleKeys[$model->table];
|
||||||
|
} else {
|
||||||
|
$showKeys = null;
|
||||||
|
}
|
||||||
$suggestedForeignKey = $this->_modelKey($alias);
|
$suggestedForeignKey = $this->_modelKey($alias);
|
||||||
} else {
|
} else {
|
||||||
$otherTable = Inflector::tableize($className);
|
$otherTable = Inflector::tableize($className);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue