mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
prevent missing-index notices
when baking with a schemaless db
This commit is contained in:
parent
f0fa6c7875
commit
43ae7af17d
1 changed files with 5 additions and 1 deletions
|
@ -675,7 +675,11 @@ class ModelTask extends BakeTask {
|
|||
$otherTable = Inflector::tableize($className);
|
||||
if (in_array($otherTable, $this->_tables)) {
|
||||
if ($assocType < 3) {
|
||||
$showKeys = $possibleKeys[$otherTable];
|
||||
if (!empty($possibleKeys[$otherTable])) {
|
||||
$showKeys = $possibleKeys[$otherTable];
|
||||
} else {
|
||||
$showKeys = null;
|
||||
}
|
||||
} else {
|
||||
$showKeys = null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue