The first column in each table is the primary key. The second column, if exists, is a foreign key referring to the related table.
I know how to write a basic relation rule. For example, in the CActiveRecord class of A
'b' => array(self::BELONGS_TO, 'B', 'b_id');
a_instance->b returns the related class B record of class A instance.
My question is, how to define a relation rule in class A to get related class C record? Does the relation rule support extra joins? If we can do that, is there any benefit of doing so in contrast to defining