Link to home
Start Free TrialLog in
Avatar of jagguy
jagguyFlag for Australia

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

 
//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);
            

Open in new window

Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

Why is this posted in CSS?  There is no part of it even remotely related to  CSS.

Cd&
Avatar of jagguy

ASKER

? remove it from css as it was a mistake?
do you have an answer?
Avatar of Loganathan Natarajan
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?
ASKER CERTIFIED SOLUTION
Avatar of jagguy
jagguy
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's fine. All the best!
Avatar of jagguy

ASKER

I found the answer