Having column name in table but show does not have a column named


Please give solution for this issue,

Add field table in after generate the model and i also add that column name in model,declare public $fieldname in my model,

but i am using,

$model = TblCms::model()->findByAttributes(array(‘id’ => $id, ‘lang_id’ => $lang1));

Got error like thia,

Table "tbl_cms" does not have a column named "lang_id".

And also i generate model again.

Plz tell solution for my above issue


if add your field in table in mysql , add this code:



 * This is the model class for table "your_mode_name".


 * The followings are the available columns in table 'purchase_comments':

 * @property string $id


 * @property string $new_field


class YourModeName extends CActiveRecord






Got It,

Protected inside runtime folder inside delete cache file.