public function getByApplication(Application $application, $limit = 50, $page = 0, $filter = '')
    {
        $template = ($filter) ? self::DQL_BY_APPLICATION_WITH_REF_FILTER : self::DQL_BY_APPLICATION;
        $dql = sprintf($template, Release::class);

        $params = ['application' => $application];
        if ($filter) {
            $params['ref'] = $filter;
        }

        return $this->getPaginator($dql, $limit, $page, $params);
    }