Is there any way of eagerly fetching all objects through a relation when you already have the AR object?
I.e. I have a Event object that contains multiple participants, each with multiple exchanges. I also use the CTabView widget. In one of the tabbed panels, I need to access all of the exchanges of all the people in a given event. If I do:
foreach ( $model -> participants as $participant ) foreach ( $participant -> exchanges as $exchange ) echo $exchange -> amount;
Yii will generate one query for each person because of the lazy loading. Can I somehow tell the model AFTER fetching it to eagerly load all participants and their exchanges?
If not, this would be a great additions to the next version of Yii!