Have a default scope which is on tenant_id and project_id. tenant_id no relation. Project_id has a relation.
public function defaultScope()
{
return array(
'condition'=>'project_id='.Yii::App()->user->projectId
.' and tenant_id='.Yii::App()->user->tenantId
);
}
I know i can use resetScope to "bypass/disable" the default scope. How can i bypass part of the default scope - only project_id?
My app is a multi-tenant app. all records are separated by a tenant_id (no fk). Any help is appreciated.