Re: HABTM pagination issue

2009-10-12 Thread double07
Actually, I found when I did it with the above code I lost all my existing relationships which caused problems. I worked out a better way: $this->News->bindModel(array('hasOne' => array('NewsVenue')), false); $this->set(array('news' => $this->paginate('News', array ('NewsVenue.venue_id' => 1;

Re: HABTM pagination issue

2009-10-11 Thread double07
Thanks for pointing me in the right direction. For some reason $this->paginate('RolesUser'); didn't work by itself, but after having the same issue later in the project the solution was: (where News hasandbelongstomany Venue) $this->News->NewsVenue->bindModel(array('belongsTo' => array('News', '

Re: HABTM pagination issue

2009-09-15 Thread Miles J
To paginate with HABTM, you must use the HABTM model. $this->paginate('RolesUser'); On Sep 15, 11:32 am, Jacques wrote: > Having a similar problem, anyone have any ideas? > > On Sep 2, 8:08 am, double07 wrote: > > > Hi All, > > > I'm having an issue with usingHABTMwithpagination... > > > My ap

Re: HABTM pagination issue

2009-09-15 Thread Jacques
Having a similar problem, anyone have any ideas? On Sep 2, 8:08 am, double07 wrote: > Hi All, > > I'm having an issue with usingHABTMwithpagination... > > My app has a users and roles table - usersHABTMroles, roles have > many users. > > In my users index controller I'm trying to limit thepagina

HABTM pagination issue

2009-09-01 Thread double07
Hi All, I'm having an issue with using HABTM with pagination... My app has a users and roles table - users HABTM roles, roles have many users. In my users index controller I'm trying to limit the pagination results so that only users with certain roles are displayed. At the moment I have: $thi