Yii framework reset defaultScope

828 Views Asked by At

In Yii framework, how can I disable defaultScope ?

I tried with resetScope(false) and resetScope(true) but to no avail.

Any help would be really appreciated.

1

There are 1 best solutions below

2
On

you can disable defaultScode by overriding defaultScope() method and returning empty array.

public function defaultScope()
{
    return array();
}