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 column
'Campaign.campaignname' in 'field list'"..On 2 Wrz, 13:27, Ace <[email protected]> wrote: > 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 like to find all stats from some period of time - > I did set recursive to 2 and called find('all') with conditions on > StatsHourly model. Result contains info about zone and banner but > doesn't say anything about associated Campaign and Publisher. Why is > that? It seems that recursive joins are not working for some reason, > but I don;t know why.. I called $this->Banner->find('all') to check if > the relation between Banner and Campaign is ok - result contained > Campaign info so it's ok. > > Can it be because I use fields parameter with SUM and other sql > functions? > > Thanks for any help > Konrad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
