Re: Associated model won't load

2010-02-18 Thread John Andersen
Hmm, could have been the model cache maybe :) Well, good that it seems solved! Enjoy, John On Feb 18, 6:03 am, Furuno wrote: > Well, yesterday, I try to re-create the app and database from scracth, > copy paste the code again, and, for some reason... it works... and now > I left in wonder... >

Re: Associated model won't load

2010-02-17 Thread Furuno
Well, yesterday, I try to re-create the app and database from scracth, copy paste the code again, and, for some reason... it works... and now I left in wonder... @ John Andersen : Actually this project is very nearing completion and will be released as an open source application. Even it already h

Re: Associated model won't load

2010-02-17 Thread John Andersen
I can give it a try in my development site, if you would like me to try! Probably only need the two controllers with models! John On Feb 17, 9:13 am, Furuno wrote: > Okay somebody please tell me that this is some kind of mystical > phenomenon : yeah, I've tried using containable behaviors, not

Re: Associated model won't load

2010-02-16 Thread Furuno
Okay somebody please tell me that this is some kind of mystical phenomenon : yeah, I've tried using containable behaviors, not using pagination, not using admin routes, redownload the cakephp library, reinstalling apache and mysql, and anything I can think about other that reinstall the OS and upgr

Re: Associated model won't load

2010-02-16 Thread Furuno
WIll try once I got to back to my office (it's 6.30 AM currently)... thanks! On 17 Feb, 03:58, John Andersen wrote: > I assume that you are not using the Containable behaviour, so my last > suggestion is - have a look at the Containable behaviour, I use it > myself and it saved a lot of time when

Re: Associated model won't load

2010-02-16 Thread John Andersen
I assume that you are not using the Containable behaviour, so my last suggestion is - have a look at the Containable behaviour, I use it myself and it saved a lot of time when I want to be sure that I retrieve not only one model but also associated models from up to several levels of associations.

Re: Associated model won't load

2010-02-16 Thread Furuno
Well, actually, yes... :) To make sure that everything runs fine, I'm actually creating the refinements of my final prototype application (an online exam system), and I've obviously copy paste anything from the protype code, the new stuff here is just pagination. I've tried removing pagination too

Re: Associated model won't load

2010-02-16 Thread John Andersen
Have you checked that the Subject model filename is subject.php? And the model is named Subject not subject? Just trying to throw something around, which usually creates these kind of problems :) Maybe copy/paste the Subject model into a post! John On Feb 16, 10:20 pm, Furuno wrote: > tried

Re: Associated model won't load

2010-02-16 Thread Furuno
tried that too... still no luck... Really, I think I've exhausted a lot of methods already but still can't fix it... On 17 Feb, 03:09, John Andersen wrote: > Damn :) Ok, have you tried adding the uses variable? > > [code] >    var $uses = array('Subject'); > [/code] > > in the Subjects controller

Re: Associated model won't load

2010-02-16 Thread John Andersen
Damn :) Ok, have you tried adding the uses variable? [code] var $uses = array('Subject'); [/code] in the Subjects controller! John On Feb 16, 9:49 pm, Furuno wrote: > well, I'm afraid it's only in the post... > > On 17 Feb, 02:38, John Andersen wrote: > > > Are you missing a semicolon in

Re: Associated model won't load

2010-02-16 Thread Furuno
well, I'm afraid it's only in the post... On 17 Feb, 02:38, John Andersen wrote: > Are you missing a semicolon in this code? > > [code] > class Subject extends AppModel { >         var $belongsTo = 'Program'} > > ?> > [/code] > > just after 'Program' ? or was it a type in the post :) > Enjoy, >

Re: Associated model won't load

2010-02-16 Thread John Andersen
Are you missing a semicolon in this code? [code] [/code] just after 'Program' ? or was it a type in the post :) Enjoy, John On Feb 16, 9:01 pm, Furuno wrote: > 1.2.6... > > On 17 Feb, 01:57, andy wrote: > > > Do you know what version of CakePHP you are running? > > > On Feb 16, 10:00 am, F

Re: Associated model won't load

2010-02-16 Thread Furuno
1.2.6... On 17 Feb, 01:57, andy wrote: > Do you know what version of CakePHP you are running? > > On Feb 16, 10:00 am, Furuno wrote: > > > > > Nope... :( > > > Just to make sure, I tried that once again with : > > $this->set('subjects', $this->Subject->find('all')); > > > still no luck... > > >

Re: Associated model won't load

2010-02-16 Thread andy
Do you know what version of CakePHP you are running? On Feb 16, 10:00 am, Furuno wrote: > Nope... :( > > Just to make sure, I tried that once again with : > $this->set('subjects', $this->Subject->find('all')); > > still no luck... > > On 17 Feb, 00:56, andy wrote: > > > > > Does it work if you

Re: Associated model won't load

2010-02-16 Thread Furuno
Nope... :( Just to make sure, I tried that once again with : $this->set('subjects', $this->Subject->find('all')); still no luck... On 17 Feb, 00:56, andy wrote: > Does it work if you try doing a $this->Subject->find() instead of > using paginate?  Just to see if that works... > > On Feb 16, 9:3

Re: Associated model won't load

2010-02-16 Thread andy
Does it work if you try doing a $this->Subject->find() instead of using paginate? Just to see if that works... On Feb 16, 9:37 am, Furuno wrote: > Okay, so, I have two models called Program and Subject, here's the > classes : > > program.php > class Program extends AppModel { >         var $h

Associated model won't load

2010-02-16 Thread Furuno
Okay, so, I have two models called Program and Subject, here's the classes : program.php subject.php And the controllers : programs_controller.php 20); function admin_index() { $this->set('programs', $this->paginate('Program')); } } ?> subjects_controller.ph