Re: problem with recursive join from stats table

2009-09-02 Thread Ace
It must be somehow connected with "fields" parameter - when I dont use it, cake does multiple join. But when I add 'fields'=>array ('Campaign.campaignname','SUM( StatsHourly.impressions ) AS impressions',(...)) into the find method call cake does only first level joins and I get sql error "Unknown

problem with recursive join from stats table

2009-09-02 Thread Ace
Hi, In my adserver's database I have ad impressions stas in table named data_summary_ad_hourly. Model for this table is named StatsHourly and it "belongsTo" Banner and Zone model. Banner model belongsTo Campaign model and Zone model belongs to Publisher model. It's all quite logical. Now I would