大家好,我遇到了一个 Doctrine 连接查询。
系统继续告诉我拍卖未映射:
Class Auction does not exist and could not be loaded in Doctrine/doctrine-orm/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php on line 40
显然,该项目已经开始,并且成功使用了其他连接。
include_once '../../../bootstrap_doctrine.php';
$rsm = new \Doctrine\ORM\Query\ResultSetMapping;
$rsm->addEntityResult('Auction', 'Au');
$rsm->addEntityResult('VariantPerAuction', 'Vpa');
$Q=" SELECT Au.id
FROM Auction Au
JOIN VariantPerAuction Vpa ";
$query = $entityManager->createNativeQuery($Q,$rsm);
$auctions = $query->getResult();