jagguy
asked on
find list cakephp
HI,
In cakephp when I 'find all' I get all the required data and associated models as expected.
However with a find list I dont get the associated array value of tutoringtype which appears in a find all.
Lesson related to student related to tutoringtype
With the below code find list I get cant find tutoringtype col error.
The docs are not clear on this
http://book.cakephp.org/2.0/en/models/retrieving-your-data.html
In cakephp when I 'find all' I get all the required data and associated models as expected.
However with a find list I dont get the associated array value of tutoringtype which appears in a find all.
Lesson related to student related to tutoringtype
With the below code find list I get cant find tutoringtype col error.
The docs are not clear on this
http://book.cakephp.org/2.0/en/models/retrieving-your-data.html
//i have tried different recursive values
$students = $this->Lesson->Student->find('list', array('conditions' =>
array(
'TutoringType.value' => 'Individual Tuition',
'recursive' => 2
)));
$students2 = $this->Lesson->Student->find('all');
debug($students);
ASKER
? remove it from css as it was a mistake?
do you have an answer?
do you have an answer?
Have you linked models as per this associations rules? http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html
can you share those associations?
can you share those associations?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That's fine. All the best!
ASKER
I found the answer
Cd&