我有以下命令:
$rsm = new ResultSetMapping();
$query = $this->em->createNativeQuery('SELECT userid FROM prospective_shop WHERE LENGTH(bio) = 0 ORDER BY RAND()', $rsm);
//$query->setMaxResults(10);
$prospectiveShops = $query->getResult();
这里它给了我一个空数组。我复制粘贴了那个 SQL,它工作得很好。知道为什么吗?