protected function applyFilter(RestRequestContract $request, QueryBuilder $qb)
    {
        $entity = $this->base()->findById($request->getId());

        $relateCriteria = Criteria::create();
        $relateCriteria->andWhere($relateCriteria->expr()->eq($this->mappedBy(), $entity->getId()));

        $qb->innerJoin($qb->getRootAliases()[0].'.'.$this->mappedBy(), $this->mappedBy());
        $qb->addCriteria($relateCriteria);

        parent::applyFilter($request, $qb);
    }