No result was found for query although at least one row was expected. #5003

Open
opened 2026-01-22 14:56:20 +01:00 by admin · 0 comments
Owner

Originally created by @bocharsky-bw on GitHub (Feb 4, 2016).

Originally assigned to: @Ocramius on GitHub.

Does it normal behaviour if I get NoResultException exception though I call getOneOrNullResult() method?

$qb->getQuery()->getOneOrNullResult(Query::HYDRATE_SINGLE_SCALAR);

I expected to get null if result not found due to getOneOrNullResult() method name, but got a NoResultException exception instead.

Originally created by @bocharsky-bw on GitHub (Feb 4, 2016). Originally assigned to: @Ocramius on GitHub. Does it normal behaviour if I get `NoResultException` exception though I call `getOneOrNullResult()` method? ``` php $qb->getQuery()->getOneOrNullResult(Query::HYDRATE_SINGLE_SCALAR); ``` I expected to get `null` if result not found due to `getOneOrNullResult()` method name, but got a `NoResultException` exception instead.
admin added the Invalid label 2026-01-22 14:56:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5003