CDbException

数据库中无法找到 active record class "Node" 对应的 table "node".

/websites/html/protected/framework/db/ar/CActiveRecord.php(2312)

2300     private $_model;
2301 
2302     /**
2303      * Constructor.
2304      * @param CActiveRecord $model the model instance
2305      */
2306     public function __construct($model)
2307     {
2308         $this->_model=$model;
2309 
2310         $tableName=$model->tableName();
2311         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2312             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2313                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2314         if($table->primaryKey===null)
2315         {
2316             $table->primaryKey=$model->primaryKey();
2317             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2318                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2319             else if(is_array($table->primaryKey))
2320             {
2321                 foreach($table->primaryKey as $name)
2322                 {
2323                     if(isset($table->columns[$name]))
2324                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#1
+
 /websites/html/protected/modules/wfbase/components/WfCriteria.php(38): CActiveRecord::model("Node")
33               public function getModel()
34               {
35                   if (!isset($this->_model))
36                   {
37                       $modelClass=Yii::import($this->modelClass);
38                       $this->_model=  WfActiveRecord::model($modelClass);
39                   }
40                   return $this->_model;
41               }
42               public function createCriteria($condition='',$params=array())
43               {
#2
+
 /websites/html/protected/modules/wfbase/components/WfCriteria.php(97): WfCriteria->getModel()
092                     return $this->getModel()->resetScope()->find($this->createCriteria($condition,$params));
093                 }
094                 public function findAll($condition='',$params=array ( ))
095                 {
096                     $this->replaceParameters();
097                     return $this->getModel()->resetScope()->findAll($this->createCriteria($condition,$params));
098                 }
099                 public function findAllByAttributes($attributes,$condition='',$params=array())
100                 {
101                     $this->replaceParameters();
102                     return $this->getModel()->resetScope()->findAllByAttributes($attributes,$this->createCriteria($condition,$params));
#3
+
 /websites/html/themes/basic/views/site/index.php(11): WfCriteria->findAll()
06     <div class="section_banner">
07        
08               <div class="banner">
09                 <ul class="banner_img clearfix">
10 
11                     <?php $nodes = WFTDataHelper::nodeCriteria()->addScope('byType', array(15))->addScope('byPosition')->findAll(); ?>             
12                     <?php foreach ($nodes as $key => $node ) { ?>                        
13                         <li>
14                             <a href="<?php echo $node -> getNodeValue('url')?>"><img class="pic" src="<?php echo $node->getNodeFormValue('picture') ?>" alt=""/></a>
15                         </li>
16                     <?php } ?>   
2025-12-20 17:53:55 Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 PHP/5.4.16 mod_wsgi/3.4 Python/2.7.5 Yii Framework/1.1.12
汽车模具制造  律师事务所  管道疏通  妇产医院  横流风机  茂梵商贸  防辐射服  智能马桶盖  财务管理  林瑞木业