Complex pagination and sort


Got this little task today… I have to list and paginate by two models in one list (these models share five fields, which will be displayed in one table).

Maybe model based on mysql view would handle that? Anyone? :)

Are there any relationship between the two tables?

Nope, these are something like Issue and Task tables, which share some fields and should be listed in one table. I’m aware of the fact, that it’s not direct Yii question.


You may need to develop a view class (like a database view, not Yii’s view) like:

class CombinedModel extends CModel {…}

But there’d be a whole lot of redevelopment for the findXXX(), count(), setXXX() (and other similar) methods.

But Yii and its community would be greatful if you could share the result :slight_smile: