ModelBundle/Repository/ContentRepository.php
public function findLastVersion($contentId)
    {
        $qa = $this->createAggregationQuery();
        $qa->match(array('deleted' => false));
        $qa->match(array('contentId' => $contentId));
        $qa->sort(array('createdAt' => -1));

        return $this->singleHydrateAggregateQuery($qa);
    }
public function findLastVersion($contentId)
    {
        $qa = $this->createAggregationQuery();
        $qa->match(array('deleted' => false));
        $qa->match(array('contentId' => $contentId));
        $qa->sort(array('createdAt' => -1));

        return $this->singleHydrateAggregateQuery($qa);
    }
@param string $contentId

@return ContentInterface