Yii with and together with paging

So I’ve been working 50+ hours a week for 3 months now with yii, and I have one gripe…I believe the $criteria->together = true to be a hack job to work around a known bug. So I wasn’t surprised to find a bug within the existing work around.

Description of behavior:

If you use together=true the paging is incorrect, you will get varied page sizes and depending on your data this could cripple your application. I have one particular data set where if I try to display all the contacts that have a certain subscription the first page will show 1 record and the second page will show 25 records and the third page shows 5 records. This is easily replicated as it happens everywhere I allow searches on a related table.

For this reason “together” is set to false by default, if using with LIMIT (see the Guide: http://www.yiiframework.com/doc/guide/1.1/en/database.arr#relational-query-performance). It’s not a bug, because when retrieving 50 rows, 49 can be related objects or can’t be…