I know on a findAll I could call the resetScope(). What if I’m using a scope with a relation, which is to override the default scope? Below is a quick example (in which I have ‘scopes’ set to false, which does not work).
public function scopes() {
return array(
'classLists' => array(
'alias' => 'Student',
'with' => array(
'registeredClasses' => array(
'alias' => 'RegisteredClass',
'with' => array('teacher', 'service'),
'condition' => 'RegisteredClass.school_year = ' . Yii::app()->user->school_year . ' AND (RegisteredClass.end_date = 0 OR RegisteredClass.end_date > ' . time() . ')',
'scopes' => false,
)
),
'condition' => 'Student.deleted = 0 AND Student.school_year = ' . Yii::app()->user->school_year . ' AND Student.active = 1',
)
);
}