table alias for cactiverecord.relations.

Not working:




public function relations() {

  return array(

    'contact_count' => array(self::STAT, 'ContactTbl', 'group-contact(group_id, contact_id)',

       'condition' => 'contact_count.deleted IS NULL',

    ),

  );

}



Working:




public function relations() {

  return array(

    'contact_count' => array(self::STAT, 'ContactTbl', 'group-contact(group_id, contact_id)',

       'condition' => 'contact.deleted IS NULL',

    ),

  );

}



In my database, there are two tables - group and contact. They are linked by another table - group-contact. According to Yii 1.1, shouldn’t the table alias of condition be name of the relation instead of the table name?