Код: Выделить всё
public function relations()
{
return array(
array(self::BELONGS_TO, 'Market', 'id'),
);
}
Код: Выделить всё
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
array(self::HAS_MANY, 'MarketImages', 'market_id',),
);
}