Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

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

0
jagguy
Asked:
jagguy
  • 3
  • 2
1 Solution
 
COBOLdinosaurCommented:
Why is this posted in CSS?  There is no part of it even remotely related to  CSS.

Cd&
0
 
jagguyAuthor Commented:
? remove it from css as it was a mistake?
do you have an answer?
0
 
Loganathan NatarajanLAMP DeveloperCommented:
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?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
jagguyAuthor Commented:
I rebooted the server and the code now works so I didnt make a mistake
0
 
Loganathan NatarajanLAMP DeveloperCommented:
That's fine. All the best!
0
 
jagguyAuthor Commented:
I found the answer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now