CActiveRecord does odd SQL queries for already fetched relations

CActiveRecord does a single query to get related models but each time when accessing primary model from related one AR makes additional query to fetch primary model.