Basically whats easier for you - can't think of any "standards" for
pagination. Keep in mind that you may want to expand on it later on
(add more conditions, fetch more data etc) so keep it flexible.

On Nov 7, 5:12 pm, "Dave Maharaj" <m...@davemaharaj.com> wrote:
> Not sure if I have been looking at this all wrong. But where do you paginate
> from?
>
> For example
>
> User hasMany FavoritePosts
>
> You do not want to actually paginate the favourites (id, user_id, post_id)
> you want to actually page the Post records from the post_id in FavoritePosts
>
> So I have my favourite_posts controller index paginate which sure I can get
> all favs and contain or join them based on post_id but since what I am
> actually after is the Post data is it best to do the paging from Posts based
> on user_id since it's the post data we are after? Or paginate Post from
> FavoritePost? Does it really matter? Is there the true standard to follow? I
> mean either way I have tried it from either controller works since the
> relations allow interaction either way between but what makes sense to you?
>
> Thanks
>
> Dave

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to