grouping contained models
问题 PresentationView hasMany SlideView SlideView model has field duration. The presentation_duration = sum of all SlideView.duration fields from slide views that belong to the presentation. I want to get list (paged) of presentations with presentation_duration for each presentation. So far I am trying like this: $this->paginate['contain'] = array( 'PresentationView' => array( 'SlideView' => array( 'group' => 'SlideView.presentation_view_id', // 'conditions' => array('group' => 'SlideView