CakePHP 2.x GROUP BY within Containable
问题 I am going nuts trying to find a good solution, either using the set::extract() or something. I want to add a GROUP BY within my containable: $params = array( 'conditions'=>array( 'Project.id'=>$ProjectId ), 'contain'=>array( //Gets the User Who owns the Project 'User'=>$user, 'Bid'=>array( //The User Who owns the Bid 'User'=>$user ), 'ProjectType', 'Os', 'Comment'=>array( 'To'=>$user, 'From'=>$user, 'group'=>"Comment.from_id" ), ), ); //debug($params); return $this->find('first',$params); I