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
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
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
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
@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
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
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
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
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: