Doctrine 2: What returns getResult when there are no rows? zero?

Interestingly, it returns functions like get*Result() . Seems null? Where can I find such information in documents?

+4
source share
2 answers

get*Result() methods return empty array()
getSingle*Result() methods throw a \Doctrine\ORM\NoResultException

The API document is at http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/index.html

+12
source

Just use var_dump () and you will see exactly what the function returns.

-4
source

Source: https://habr.com/ru/post/1336588/


All Articles