Sortie du snippet Doctrine "Exécuter des requêtes SQL brutes avec Doctrine"

Environnement :

  • Strangebuzz Snippet VM : 6.4.9
  • Symfony : 6.4.20

Sortie du code exécuté :

-- $statement->fetchAllAssociative() --
SELECT type, count(*) AS count FROM article WHERE id > ? GROUP BY type

array(2) {
  [0]=>
  array(2) {
    ["type"]=>
    string(9) "blog_post"
    ["count"]=>
    int(37)
  }
  [1]=>
  array(2) {
    ["type"]=>
    string(7) "snippet"
    ["count"]=>
    int(280)
  }
}
-- $this->connection->fetchAllAssociative() --
SELECT type, count(*) AS count FROM article GROUP BY type

array(2) {
  [0]=>
  array(2) {
    ["type"]=>
    string(9) "blog_post"
    ["count"]=>
    int(40)
  }
  [1]=>
  array(2) {
    ["type"]=>
    string(7) "snippet"
    ["count"]=>
    int(297)
  }
}
-- $this->entityManager->createNativeQuery() --
array(2) {
  [0]=>
  array(2) {
    ["type"]=>
    string(9) "blog_post"
    ["count"]=>
    int(40)
  }
  [1]=>
  array(2) {
    ["type"]=>
    string(7) "snippet"
    ["count"]=>
    int(297)
  }
}