-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
This part of your code is the question, right?
if ($this->action->id === 'reviews') {
// This is the bit that doesn't work.
// To produce a table of song reviews... How??
$columns[] = array(
'name' => 'song.reviews.review',
'filter' => CHtml::activeTextField($song, 'review'),
);
$song->criteria->group = 'reviews.song_id';
$song->criteria->with = array('song', 'song.reviews', 'genre');
$song->criteria->together = true;
}
I assume by grouping it to song_id, only one row is returned by the database per song. So you see only one review per song. Correct?
Reactions are currently unavailable