My tables have LanguageId field and I want to select records that have LanguageId == Yii::app()->language. Can anyone give me a tip how to implement it without writing everytime mode()->findAll('LanguageId='.Yii::app()->language). Maybe as CActiveRecordbehavior.
Thanks a lot. I saw cookbook article about named scope features, but I wanted some fully transparent solution e.g. add language parameter in beforeContruct event with new getDbCriteria and mergeWith methods. But now I think that named scope is better solution here - it's more controlled and without "side effects".