public function relations()
{
return array(
'pointA' => array(self::BELONGS_TO, 'Contr', 'point_a'),
'pointB' => array(self::BELONGS_TO, 'Contr', 'point_b')
);
}
// different aliases for one table
$criteria->with = array(
'pointA.contrMain' => array('alias' => 'test1'),
'pointB.contrMain' => array('alias' => 'test2')
);