Relations and "through"

Hi,

is it possible, with a relation like this (that uses "through"), to fetch data from the bridge table, at the same that we fetch data in the target table ?


// Department model

'users' => array(self::HAS_MANY, 'Users', 'id_user', 'through'=>'user_department'),

I do not see the advantage to doing so. Do you have a specific question that this relates to?

Since you already have user_department relation it is just as easy to request info from there as it is from users since you have to define which relation you are using on every attribute anyways.