Browse files

another bulletproofing for schemaless baking

  • Loading branch information...
1 parent d2514f3 commit adf73abb074d732b0b5ba5f41ab23fe56f511b4c @AD7six AD7six committed Nov 20, 2011
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
@@ -669,7 +669,11 @@ public function doMoreAssociations($model, $associations) {
$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);

0 comments on commit adf73ab

Please sign in to comment.