Hello i am trying to follow blog tutorial of yii…
When in my Issue model have
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'ps' => array(self::BELONGS_TO, 'Person', 'ps_id'),
'sc' => array(self::BELONGS_TO, 'ServiceCategory', 'sc_id'),
'st' => array(self::BELONGS_TO, 'Status', 'st_id'),
'py' => array(self::BELONGS_TO, 'Priority', 'py_id'),
'us' => array(self::BELONGS_TO, 'User', 'us_name'),
'reports' => array(self::HAS_MANY, 'Report', 'is_code'),
'slabsTags' => array(self::MANY_MANY, 'Tag', 'slabs_tag_for_issue(tg_id, is_id)'),
'reportCount' => array(self::STAT, 'Report', 'is_code'),
);
}
And in my view i get
CException
Description
Property "Issue.repoctCount" is not defined.
Source File
/home/dmtrsslvdr/public_html/yii/framework/db/ar/CActiveRecord.php(107)
When i
var_dump($issue->reportCount)
Why is this happening??? I am using
mysql Ver 14.14 Distrib 5.1.47, for redhat-linux-gnu (i386) using readline 5.1