private function _deleteTermDocumentsExceptForCurrentTerm(Term $currentTerm, $documentId, $type)
 {
     $qb = $this->doctrine->getRepository('TermBundle:Term')->getQueryBuilderForDeletingTermDocumentsByDocumentIdAndType($documentId, $type);
     $qb->andWhere('a.term != :currentTermId')->setParameter('currentTermId', $currentTerm->getId());
     $qb->getQuery()->execute();
 }