public function mpttLocationList() {
$q = $this->_em->createQuery("
SELECT CONCAT(REPEAT('.', COUNT(parent.region_name) - 1), node.region_name) AS name
FROM ViveListingBundle:region_redefine AS node,
ViveListingBundle:region_redefine AS parent
WHERE node.lft BETWEEN parent.lft AND parent.rgt
GROUP BY node.region_name
ORDER BY node.lft");
return $q->getResult();
}
上面的代码给出了错误:
[Syntax Error] line 0, col 23: Error: Expected known function, got 'REPEAT'.