Skip to content

Commit

Permalink
minor symfony#8949 Update doctrine.rst (MarcusSchwarz)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.0 branch.

Discussion
----------

Update doctrine.rst

Fixes two minor issues in code examples

Commits
-------

4e10bdd Update doctrine.rst
  • Loading branch information
javiereguiluz committed Jan 2, 2018
2 parents b3f121e + 4e10bdd commit 42c038a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ a new method for this to your repository::
return $qb->execute();

// to get just one result:
// $product = $query->setMaxResults(1)->getOneOrNullResult();
// $product = $qb->setMaxResults(1)->getOneOrNullResult();
}
}

Expand Down Expand Up @@ -654,6 +654,8 @@ In addition to the query builder, you can also query with `Doctrine Query Langua

public function findAllGreaterThanPrice($price): array
{
$em = $this->getEntityManager();
$query = $em->createQuery(
'SELECT p
FROM App\Entity\Product p
Expand Down

0 comments on commit 42c038a

Please sign in to comment.