public function findCollectionBreadcrumbById($id)
{
try {
$sql = sprintf('SELECT n, collectionMeta, defaultMeta
FROM %s AS p,
%s AS n
LEFT JOIN n.meta AS collectionMeta
LEFT JOIN n.defaultMeta AS defaultMeta
WHERE p.id = :id AND p.lft > n.lft AND p.rgt < n.rgt
ORDER BY n.lft', $this->_entityName, $this->_entityName);
$query = new Query($this->_em);
$query->setDQL($sql);
$query->setParameter('id', $id);
return $query->getResult();
} catch (NoResultException $ex) {
return [];
}
}