public function addChildPermission(Role $role, Permission $permission)
    {
        $rolePermission = new RolePermission();

        $rolePermission->setPermission($permission);
        $rolePermission->setRole($role);

        try {
            $this->saveEntity($rolePermission);
        } catch (UniqueConstraintViolationException $e) {
            throw new NotUniqueException('Permission ' . $permission->getName() . ' is already assigned to role ' . $role->getName());
        }
    }