I wonder what is returned by functions like get*Result()
. It seems like null? Where in the docs can I find such info?
get*Result()
methods return an empty array()
getSingle*Result()
methods throw a \Doctrine\ORM\NoResultException
Here are direct links to the doctrine API docs
getResult()
doctrine API docs
getSingleResult()
doctrine API docs
getSingleScalarResult()
doctrine API docs
getOneOrNullResult()
doctrine API docs
Also important exceptions:
NoResultException
doctrine API docs
NonUniqueResultException
doctrine API docs (must handle for getSingle*()
and getOneOrNullResult()
methods)
UnexpectedResultException
doctrine API docs (this is parent exception of the two above)direct links are for 2.6, but you can find there more recent versions at the at http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/index.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With