how to ignore defaultScope in CActiveRecord


I’m thinking how to ignore default scopes

I’m using

    	$criteria = new CDbCriteria;

    	$criteria->order = 'fields.position DESC';

    	$criteria->together = true;

    	$criteria->condition = 'publish=:publish AND category_id IS NOT NULL';

    	$criteria->params = array(':publish' => 1);

    	$fields = ItAdsCategories::model()->with('fields');


    	//$fields->resetScope();   // <img src='' class='bbc_emoticon' alt='???' />?<img src='' class='bbc_emoticon' alt='???' />?

    	$fields = $fields->findAll($criteria);

I don’t understand in witch plase I must use resetScopes to reset ‘fields’ relation default scopes.

Hope I clearlly describe my problem :)


your welcome

Hey, are you indonesian…

i never use resetScope, sorry.

which yii class belongs to this function?

Go to and insert resetScope

Are there any examples how to use reset scope with MyModel::model()->with(‘myrelation’)->findAll ?

AS i find out it will be fixed in 1.2 version.