prevent missing-index notices

when baking with a schemaless db
This commit is contained in:
AD7six 2011-11-20 15:44:44 +01:00
parent f0fa6c7875
commit 43ae7af17d

View file

@ -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;
}