Doctrine: get single row or null
$query->getOneOrNullResult();- no result: return null
- more than one result: throw an NonUniqueResultException exception
https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/AbstractQuery.php#L763
Written by Andréia Bohner
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
 #Doctrine2 
Authors
Related Tags
#doctrine2
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#

 
 
 
