$connection = $entityManager->getConnection(); $statement = $connection->prepare("DELETE FROM NoraRejected WHERE YEAR(date_of_issue) = :activeYear"); $statement->bindValue('activeYear', $this->year); $statement->execute();