Hi all,
I had an application which I start to write when Yii has 1.0.3 or 1.0.4 release. Now, I updated into 1.0.7 I realized following problems for News AR model which I have.
[b]Problem
[/b]I’ve defined News AR class which consist of following relations:
public function relations()
{
return array(
'author' =>array(self::BELONGS_TO, 'User', 'author_id'),
'comments' =>array(self::HAS_MANY, 'NewsComment', 'news_id'),
'category' =>array(self::HAS_MANY, 'NewsCategory', 'news_id'),
'txt' =>array(self::HAS_ONE, 'NewsTxt', 'news_id'),
'categoryFilter'=>array(
self::MANY_MANY,
'Category',
'news_category(news_id,category_id)',
'together'=>true,
'joinType'=>'INNER JOIN',
'condition'=>'categoryFilter.id=:category'
),
);
}
When I’m trying to do create text for news, by creating new NewsTxt instance and assign it to txt property of above AR its not allowed anymore. Following error message is displayed:
Additionally I was using txt property in views in following way:
<?php echo CHtml::activeLabelEx($news->txt,'text'); ?>
<?php echo CHtml::activeTextArea($news->txt,'text',array('rows'=>20, 'cols'=>45)); ?>
I’m not allowed to do this to. Error message is:
Any idea why?
Cheers, aztech