CDbException

The table "blog" for active record class "Blog" cannot be found in the database.

/home/hikaffwo/biennale.dp.ua/framework/db/ar/CActiveRecord.php(2362)

2350 
2351     /**
2352      * Constructor.
2353      * @param CActiveRecord $model the model instance
2354      * @throws CDbException if specified table for active record class cannot be found in the database
2355      */
2356     public function __construct($model)
2357     {
2358         $this->_modelClassName=get_class($model);
2359 
2360         $tableName=$model->tableName();
2361         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2362             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2363                 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName)));
2364         if($table->primaryKey===null)
2365         {
2366             $table->primaryKey=$model->primaryKey();
2367             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2368                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2369             elseif(is_array($table->primaryKey))
2370             {
2371                 foreach($table->primaryKey as $name)
2372                 {
2373                     if(isset($table->columns[$name]))
2374                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#1
+
 /home/hikaffwo/biennale.dp.ua/protected/models/behaviors/MultilingualBehavior.php(259): CActiveRecord->getMetaData()
254     
255     private $_notDefaultLanguage = false;
256     
257     private function createLocalizedRelation($owner, $lang) {
258         $class = CActiveRecord::HAS_MANY;
259         $owner->getMetaData()->relations[$this->localizedRelation] = new $class($this->localizedRelation, $this->langClassName, $this->langForeignKey, array('on' => $this->localizedRelation . "." . $this->langField . "='" . $lang . "'", 'index' => $this->langField));
260     }
261             
262     /**
263      * Attach the behavior to the model.
264      * @param model $owner 
#2
+
 /home/hikaffwo/biennale.dp.ua/protected/models/behaviors/MultilingualBehavior.php(294): MultilingualBehavior->createLocalizedRelation(Blog, "ua")
289         }
290         if (array_values($this->languages) !== $this->languages) { //associative array
291             $this->languages = array_keys($this->languages);
292         }
293         $class = CActiveRecord::HAS_MANY;
294         $this->createLocalizedRelation($owner, Yii::app()->language);
295         $owner->getMetaData()->relations[$this->multilangRelation] = new $class($this->multilangRelation, $this->langClassName, $this->langForeignKey, array('index' => $this->langField));
296         
297         $rules = $owner->rules();
298         $validators = $owner->getValidatorList();
299         foreach ($this->languages as $l) {
#6
+
 /home/hikaffwo/biennale.dp.ua/protected/models/Blog.php(439): CActiveRecord::model("Blog")
434      */
435 
436     public static function model($className=__CLASS__)
437     {
438 
439         return parent::model($className);
440 
441     }
442 
443     public static function getMonth($m)
444     {
2024-03-29 17:53:10 Apache Yii Framework/1.1.15