Hello

Thanks for your replies. I thought I was watching this topic, but
wasn't aware that the discussion had continued without me!

Brian - I think you've hit the nail on the head regarding my
containment problem, but I still don't have it working.
Miles J - I assure you they are all belongsTo associations. What is
wrong with my conditions array?

I've stripped it back a bit to try and get the 'School' association
working first. Here's what I have:

                $this->paginate['CourseResult'] = array(
                        'fields' => array(
                                'CourseResult.id',
                                'CourseResult.course_id',
                                'CourseResult.no_of_weeks',
                                'CourseResult.year',
                                'CourseResult.price'
                        ),
                        'contain' => array(
                                'Course' => array(
                                        'fields' => array(
                                                'Course.id',
                                                'Course.school_id',
                                                'Course.name',
                                                'Course.course_language_id',
                                                'Course.course_type_id',
                                                
'Course.course_qualification_id',
                                                'Course.course_level_min',
                                                'Course.course_level_max',
                                                'Course.published',
                                                'Course.deleted'
                                        ),
                                        'School' => array(
                                                'fields' => array(
                                                        'School.id',
                                                        'School.name',
                                                        'School.city',
                                                        'School.country_id'
                                                )
                                        )
                                )
                        ),
                        'conditions' => $conditions
                );
                $rows = $this->paginate('CourseResult');

Working with the same conditions as above and with the same result.

On Sep 4, 9:31 pm, Miles J <[email protected]> wrote:
> Correct me if im wrong, but are you allowed to use $conditions the way
> he is? On top of that, I feel like were not seeing all the queries,
> all of those associations cant be belongsTo.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to