define function
changed _attributes to attributes
moved to native 'related' logic from CActiveRecord
worked on relations