Is there a way to solve this like I tryd to? Cause in some cases it doesn’t make sense (in my opinion) to requery data within the controller when I can access this data via the $model of the view 'cause the required data is delivered throug relationship. In my opininon it only makes sense to requery the data when I need to apply furthermore filters / criteria.
Does anyone has a solution for this for me? Would be great.
As of Yii 1.1.4 (a later version than what the book is using), you could use the CArrayDataProvider and construct it with the array of related model instances. The dataProvider property of CListView needs to be of type IDataProvider. $model->issues is an array of issue model objects, not itself an object that implements IDataProvider.