Hello,

CakePHP is building a query like this:
(this is just a snippet, but enough to show the problem)

SELECT COUNT(*) AS "count" FROM "people" AS "People" left JOIN
people_language  ON ("People"."oid" = 'people_language.people_oid');

Postgres returns an error when CakePHP tries to run this, because
'people_language.people_oid' shouldn't be in single quotes. It should
be either:

people_language.people_oid
OR
"people_language"."people_oid"

The code I'm running for this to happen is:

        class PeopleController extends AppController {

            var $paginate = array(

                        'limit' => 20,
                        'order' => array(
                                'Person.fullname' => 'asc'
                        )
                        'joins' => array(
                                array(
                                        'table' => 'people_language',
                                        'type'  => 'left',
                                        'conditions' => array("People.oid" =>
"people_language.people_oid")
                                )
                        )
                );

            function index() {
                   $data = $this->paginate();
            }
        }

Does anyone know how I could correct this?

Any help much appreciated,
Rangi

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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