getTableAlias(); return array( 'quota' => array(self::BELONGS_TO, 'Quota', '', 'on' => "quota.id = $alias.quotals_quota_id"), ); } /** * Returns this model's validation rules * */ public function rules() { return array( array('quotals_name','LSYii_Validators'),// No access in quota editor, set to quota.name array('quotals_message','LSYii_Validators'), array('quotals_url','LSYii_Validators','isUrl'=>true), array('quotals_urldescrip','LSYii_Validators'), ); } function insertRecords($data) { $settings = new self; foreach ($data as $k => $v) $settings->$k = $v; return $settings->save(); } } ?>