public function preRemove($e)
    {
        $entity = $e->getObject();

        if ($entity instanceof $this->className) {
            // schedule alias removal (this needs to be done before the entity is removed and loses its id)
            $this->container->get($this->aliaserServiceId)->removeAlias($entity, true);
        }
    }