1
0
mirror of synced 2024-12-14 07:06:04 +03:00

Changed instances of entity manager variable '' to '' for consistency.

This commit is contained in:
asartalo 2011-04-24 13:21:34 +08:00
parent 511268ddd7
commit 3cac853dd4

View File

@ -975,7 +975,7 @@ can rewrite our code:
<?php
$dql = "SELECT b, e, r, p FROM Bug b JOIN b.engineer e ".
"JOIN b.reporter r JOIN b.products p ORDER BY b.created DESC";
$query = $em->createQuery($dql);
$query = $entityManager->createQuery($dql);
$bugs = $query->getArrayResult();
foreach ($bugs AS $bug) {
@ -1116,7 +1116,7 @@ grouped by product:
<?php
$dql = "SELECT p.id, p.name, count(b.id) AS openBugs FROM Bug b ".
"JOIN b.products p WHERE b.status = 'OPEN' GROUP BY p.id";
$productBugs = $em->createQuery($dql)->getScalarResult();
$productBugs = $entityManager->createQuery($dql)->getScalarResult();
foreach($productBugs as $productBug) {
echo $productBug['name']." has " . $productBug['openBugs'] . " open bugs!\n";