Re: cake cant find model's method!!!

2009-09-09 Thread Martin Westin
I am not sure about this but I have a vague memory about reading that for habtm Cake does not look for any real model unless you specify with in the association. The automagic being that you don't have to make a real linking model for those simple habtm associations and Cake does not have to

Re: cake cant find model's method!!!

2009-09-09 Thread Miles J
Yes the join or relation HABTM table uses the AppModel object unless you supply a model name with the with option. Ive ran into many problems because of this. On Sep 8, 11:21 pm, Martin Westin martin.westin...@gmail.com wrote: I am not sure about this but I have a vague memory about reading

Re: cake cant find model's method!!!

2009-09-08 Thread Dr. Loboto
Output get_class($this-EnrolleesOfferedSubject) in your controller. If it is AppModel cake cannot find your model file. On Sep 8, 10:32 am, learning_cake_php lunaro...@gmail.com wrote: i already check my model names and codes... i have a controller named EnrollmentController and from there i

Re: cake cant find model's method!!!

2009-09-08 Thread Martin Westin
I agree with the good doctor. One detail you may not realise is that it matters little if if you name the model correctly unless you also specify with on the associations... and that you do it from both sides. Unless you specify with and specify the Modelname Cake might be loading AppModel (I

Re: cake cant find model's method!!!

2009-09-08 Thread learning_cake_php
@Dr. Loboto it tried it and unfortunately its AppModel...how can this be?? @Martin Westin: what is with in model? is it a model property? how can i use it?(i think i need some further readings) On Sep 7, 11:33 pm, Dr. Loboto drlob...@gmail.com wrote: Output

Re: cake cant find model's method!!!

2009-09-08 Thread learning_cake_php
WELL WELL..hehe.. nice trick you had ther..i read the manual aboyt HABTM's with and kablamm!! it works.. so why is cake behaving things like that?they always used the word automagically but then dont know how to automagically interpret the names i used even i followed the convention..or maybe i

Re: cake cant find model's method!!!

2009-09-07 Thread learning_cake_php
i already check my model names and codes... i have a controller named EnrollmentController and from there i used the $uses property for me to user the EnrolleesOfferedSubject model.. why is it that save,create and delete method works just fine..saves and delete to/from correct

Re: cake cant find model's method!!!

2009-09-06 Thread Dr. Loboto
With such names I better check code and model filename for misspellings. I guess that this model filename should be enrollees_offered_subject.php Remember, that if cake do not find file with model it loads AppModel instead. And if model name is conventional and table exists, all seems normal

cake cant find model's method!!!

2009-09-05 Thread learning_cake_php
well here i am again..actually i removed the original post and edited it so that it will be clearer to all of us: here we go: i just try to explain the problem after theses snippets of code: db structure: 1. model1 -id 2. model2 -id 3. model1_model2 -id -model1_id -model2_id model: