Код: Выделить всё
'itemsOnlyProducts' => array(self::HAS_MANY, 'WarehousesItems', 'warehouse_id', 'with' => array(
'product' => array(
'condition' => 'product.is_service = 0',
'joinType' => 'INNER JOIN'
)
)),
'categoriesOnlyProducts' => array(self::HAS_MANY, 'Categories', array('category_id' => 'id'), 'through' => 'itemsOnlyProducts'),