Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 未定义的方法';createQueryBuilder';_Php_Mysql_Reactjs_Api Platform.com_Doctrine Query - Fatal编程技术网

Php 未定义的方法';createQueryBuilder';

Php 未定义的方法';createQueryBuilder';,php,mysql,reactjs,api-platform.com,doctrine-query,Php,Mysql,Reactjs,Api Platform.com,Doctrine Query,我的项目文件中的这一行“$qb=$this->getDoctrine()->getManager()->createQueryBuilder();”出现错误。有人能帮我吗 我认为$qb=$this->getdoctor()->getManager()正在获取doctor\Common\Persistence\ObjectManager的实例,它没有createQueryBuilder函数 从管理器中,可以获取要获取的实体的存储库。例如: $qb = $this->getDoctrine()

我的项目文件中的这一行“$qb=$this->getDoctrine()->getManager()->createQueryBuilder();”出现错误。有人能帮我吗
我认为
$qb=$this->getdoctor()->getManager()
正在获取
doctor\Common\Persistence\ObjectManager
的实例,它没有
createQueryBuilder
函数

从管理器中,可以获取要获取的实体的存储库。例如:

$qb = $this->getDoctrine()->getManager()->getRepository('App:MyClass')->createQueryBuidler()