protected function removeNodeAndChildNodesInWorkspaceByPath($nodePath, $workspaceName)
{
/** @var QueryBuilder $queryBuilder */
$queryBuilder = $this->entityManager->createQueryBuilder();
$queryBuilder->resetDQLParts()->delete(NodeData::class, 'n')->where('n.path LIKE :path')->orWhere('n.path LIKE :subpath')->andWhere('n.workspace = :workspace')->setParameters(array('path' => $nodePath, 'subpath' => $nodePath . '/%', 'workspace' => $workspaceName))->getQuery()->execute();
}