Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

prevent missing-index notices

when baking with a schemaless db
  • Loading branch information...
commit 43ae7af17d8e4b7ab3fde850f4828dfc6a156770 1 parent f0fa6c7
@AD7six AD7six authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/Console/Command/Task/ModelTask.php
View
6 lib/Cake/Console/Command/Task/ModelTask.php
@@ -675,7 +675,11 @@ public function doMoreAssociations($model, $associations) {
$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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.