thanks for your fast answer but the problem is another. I’ll try to explain it better.
In the Yii release before 1.1 I could create the following example:
one table ‘contact’ with columns: id, name, parent1 (foreign key), parent2 (foreign key), invalid
ActiveRecordClass for ‘contact’
public function relations()
{
return array(
'fullParent1'=>array(self::BELONGS_TO, 'contact', 'parent1','alias'=>'fullParent1'),
'fullParent2'=>array(self::BELONGS_TO, 'contact', 'parent2','alias'=>'fullParent2')
);
}
public function scopes()
{
return array(
'rValid'=>array('condition'=>'??.invalid is NULL'), //for use in relations
'valid' =>array('condition'=>$this->tableName().'.invalid is NULL'), //for use in maintable
);
}