Member-only story
2 min readFeb 23, 2021
I think that college training hasn’t reached Doctrine ORM — because its DQL querying returns empty set of results, howsoever weird it is.
It’s not a proud statement, though
$users = $em->createQuery('SELECT u, n FROM ' . User::class . ' AS u JOIN ' . Note::class . ' as n')->getResult();
isn’t working as expected — the associations are fetched in a separate the same level, not nested to collections object. So, dumping isn’t pretty and surveillence unveils CCTV proximity as well as threatening danger.
More convincing stuff is — already — working Doctrine ORM associations fetch — unbelievable!
$users = $em->getRepository(User::class)->findAll();// $users = R::findAll('user');
So, the response is the same as RedBeans instance —
curl --location --request GET 'localhost:2526/index.php/api/v1/user/50'{
"data": [
{
"id": "50",
"email"…