session problem in AppController - some research and strange results

2009-09-17 Thread Ace
Hi, I have strange problem with cakephp session. I have few controllers that needs date changing logic for the stats so I moved all the needed methods to app_controller. Since then I struggle with a problem of losing session data. The main idea is simple: date is being kept in the session, in bef

Re: problem with recursive join from stats table

2009-09-02 Thread Ace
only first level joins and I get sql error "Unknown column 'Campaign.campaignname' in 'field list'".. On 2 Wrz, 13:27, Ace wrote: > Hi, > > In my adserver's database I have ad impressions stas in table named > data_summary_ad_hourly. Model for this tab

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

Re: Auth + HATM problem when want to read user details

2009-08-18 Thread Ace
gt; user_id > > I don't know if this is the reason for your trouble, but it's worth > starting from what Cake expects and see if that resolves it. > > On Tue, Aug 18, 2009 at 8:09 AM, Ace wrote: > > > I have my users in standard users table. There is also an a

HABTM problem

2009-08-18 Thread Ace
I have standard users table. Every user can have many accounts (account is a group of permissions, like a role) and every account can be linked to many users. Relation is HABTM as you can see. When I call: $accounts=$this->User->find('first', array('conditions' => array ('User.user_id' => 1)));

Auth + HATM problem when want to read user details

2009-08-18 Thread Ace
I have my users in standard users table. There is also an account table. Every user can have many accounts (account is let's say a group of premissions, like a role) and every account can have many users so the relation is HABTM (there is a linking table - account_user_assoc). When the user is bei