public function removeLink(ResourceNode $resource, $target)
    {
        if (!$target instanceof Ability && !$target instanceof Competency) {
            throw new \InvalidArgumentException(
                'Second argument must be a Competency or an Ability instance'
            );
        }

        if (!$target->isLinkedToResource($resource)) {
            throw new \LogicException(
                "There's no link between resource {$resource->getId()} and target {$target->getId()}"
            );
        }

        $target->removeResource($resource);
        $this->om->flush();
    }