CPagination models count (limit) bug

Hi!

I have smthng like this:


$pages=new CPagination(Request::model()->with('user','model','bsoRequests.bsoType','source','isEvent','trafficSource','broker','model.vendorModel')->together()->count($criteria));

and then


$models=Request::model()->with('user','model','bsoRequests.bsoType','source','isEvent','trafficSource','broker','model.vendorModel')->together()->findAll($criteria);

So result in sql gives me 20 rows (default limit - page size), but there is ‘isEvent’ relation, which is in Request model:


'isEvent' => array(self::HAS_MANY, 'Event', 'requestId'),

Finally I have 20 rows, but they are not unique by Request.id, something like:

id|bla|isEvent

1|a|2

1|a|3

1|a|4

2|b|5

2|b|6

etc

how can I use pagination in case of this result?

PS sorry for my bad english explanation

I’ve remove together and it’s ok, but how in case of together?