/**
  * {@inheritDoc}
  * @see \DMA\Friends\Classes\API\BaseResource::applyFilters()
  */
 protected function applyFilters(ModelRepository $model = null)
 {
     $query = parent::applyFilters($model);
     // TODO : is better to transpode the data rows to columns
     // but for now the getMetadata method on ActivityMetadataTransformer
     // and the following groupBy would work.
     // Is necessary group by session_id, otherwise
     // the response will include duplicates.
     $query = $query->groupBy('session_id');
     return $query;
 }