try { $path[] = Uuid::
fromBytesToHex($parent[$field->
getPathField()]);
} catch (InvalidUuidException|InvalidUuidLengthException
) { $path[] =
$parent[$field->
getPathField()];
} return $path;
} private function loadParents(string
$parentId, EntityDefinition
$definition, string
$versionId): array
{ $query =
$this->
getEntityByIdQuery($parentId,
$definition);
$this->
makeQueryVersionAware($definition,
$versionId,
$query);
$result =
$query->
executeQuery()->
fetchAssociative();
if ($result === false
) { return [];
} $result['parentCount'
] = 1;
if ($result['parent_id'
]) {