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;
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',
'
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
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
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