In our project we can’t upgrade to 1.1.7 because we can’t use a construct like this anymore (irrelevant code left out):
class User extends CActiveRecord
{
public function relations()
{
return array(
'team'=>array(self::BELONGS_TO,'Team','id_team'),
);
}
// Named parameterized scope: select only User if given team_id relates to active team
public function team($id)
{
$this->getDbCriteria()->mergeWith(array(
'with'=>array(
'team'=>array(
'select'=>array(),
'on'=>'team.active=1',
'joinType'=>'INNER JOIN',
),
),
));
return $this;
}
}