Updated docs
This commit is contained in:
parent
a90035e81a
commit
bea3c653bc
@ -733,7 +733,7 @@ Additionally, you can just count the result of the provided conditions when you
|
||||
|
||||
<?php
|
||||
// Check there is no user with nickname
|
||||
$availableNickname = 0 === $em->getRepository('MyProject\Domain\User')->count(array('nickname' => 'nonexistent'));
|
||||
$availableNickname = 0 === $em->getRepository('MyProject\Domain\User')->count(['nickname' => 'nonexistent']);
|
||||
|
||||
By Criteria
|
||||
~~~~~~~~~~~
|
||||
|
@ -1542,8 +1542,8 @@ deal with it:
|
||||
.. code-block:: php
|
||||
|
||||
<?php
|
||||
$productCount = $entityManager->getRepository('Product')
|
||||
->count(array('name' => $productName));
|
||||
$productCount = $entityManager->getRepository(Product::class)
|
||||
->count(['name' => $productName]);
|
||||
|
||||
Conclusion
|
||||
----------
|
||||
|
Loading…
x
Reference in New Issue
Block a user