Nobody no clue? On Jun 17, 5:43 pm, thomaus <[email protected]> wrote: > Hi there, > > I am doing 2nd order pagination using Containable. It is working fine > but when I try to paginate with a 2nd order filter, it doesn't work > anymore. > > Here are my models relations : > > "Result" belongs to "Test" > "Test" belongs to "Nationality" > > Here is my code : > > $this->Result->recursive = 2; > $this->Result->Behaviors->attach('Containable'); > > $this->paginate = array( > 'limit' => 20, > 'contain' => array( > 'Test' => array( > 'Nationality' => array('fields' => array('language_id')) > ))); > > $filter = array(); > $filter['Test.Nationality.language_id LIKE'] = 2; > > $results = $this->paginate(null, $filter); > > and I get this error: > > SQL Error: 1054: Unknown column 'Test.Nationality.language_id' > > If I empty the filter array, I can access $result['Test'] > ['Nationality']['language_id'] from my view without any problem so the > pagination is working fine BUT the filtering is NOT. Why?
-- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
