php - CakePHP 1.3 HABTM model Pagination -


hey guys, have been having issue sine using habtm relationship in models instead of using join in paginate variable in controller, data comes out fine cant set limit of projects 20.

i selecting projects db depeneding on features.

i havea feature called urgent.

im on urgent listing page.

this should fetch projects marked urgent, , fine brings results instead of limit of 20 set in paginate function or if try in models. heres pagien array code

$paginate = array(    'project' => array(       'limit' => 20,//works fine when paginating projects    ),    'feature' => array(       'limit' => 1, //did set 20 when looking thought going limit of feature table 1 anyway, notl imit projects       //also tried below       'project' => array(          'limit' => 20,//no luck       ),    ), ); 

i use paginate in controller

$this->paginate('feature', array(..conditions..)); //this brings projects marked urgent want 20! im sure im on looking simple, if 1 appreciated! chris 

are looking containablebehavior?

$paginate = array(     'feature' => array(         'contain' => array(             'project' => array(                 'limit' => 20,                 ....             )         )     ) ); 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -