find list cakephp

Posted on 2014-07-20
Last Modified: 2014-07-26

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

//i have tried different recursive  values
$students = $this->Lesson->Student->find('list', array('conditions' =>
                       'TutoringType.value' => 'Individual Tuition',
                        'recursive' => 2 
                $students2 = $this->Lesson->Student->find('all');

Open in new window

Question by:jagguy
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 53

Expert Comment

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


Author Comment

ID: 40208023
? remove it from css as it was a mistake?
do you have an answer?
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 40208234
Have you linked models as per this associations rules?

can you share those associations?
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.


Accepted Solution

jagguy earned 0 total points
ID: 40208650
I rebooted the server and the code now works so I didnt make a mistake
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 40208745
That's fine. All the best!

Author Closing Comment

ID: 40221103
I found the answer

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question