Browse Source

Fixed DB validation handling for model generator.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
8c9dadf362
  1. 3
      framework/yii/gii/generators/model/Generator.php

3
framework/yii/gii/generators/model/Generator.php

@ -464,6 +464,9 @@ class Generator extends \yii\gii\Generator
return $this->_tableNames;
}
$db = $this->getDbConnection();
if ($db === null) {
return array();
}
$tableNames = array();
if (strpos($this->tableName, '*') !== false) {
if (($pos = strrpos($this->tableName, '.')) !== false) {

Loading…
Cancel
Save