define function
changed _attributes to attributes
moved to native 'related' logic from CActiveRecord
worked on relations
Merge pull request #1 from smart--petea/master

function skelet