lib/gii/cascadeTypeModule/Generator.php
public function validateDb()
    {
        if (Yii::$app->hasComponent($this->db) === false) {
            $this->addError('db', 'There is no application component named "db".');
        } elseif (!Yii::$app->getComponent($this->db) instanceof Connection) {
            $this->addError('db', 'The "db" application component must be a DB connection instance.');
        }
    }
public function validateDb()
    {
        if (Yii::$app->hasComponent($this->db) === false) {
            $this->addError('db', 'There is no application component named "db".');
        } elseif (!Yii::$app->getComponent($this->db) instanceof Connection) {
            $this->addError('db', 'The "db" application component must be a DB connection instance.');
        }
    }
Validates the [[db]] attribute.