Hello everybody, I’m stuck with a Doctrine join query.
The system continues telling me that Auction is not mapped:
Class Auction does not exist and could not be loaded in Doctrine/doctrine-orm/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php on line 40
The project is already on, obviously, and also other joins were used with success.
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();
Thanks to Marco Pivetta, it now seems to work.
The problem seems to be that Doctrine2 Class weren’t fully namespaced.
A fast trial fully namespacing them works.
On top of each class:
The new Join Query becomes: