mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Unmachable criteria #5466
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Isinlor on GitHub (Mar 20, 2017).
Hello,
I'm trying to replicate this logic with criteria (because database filtering is faster):
Version with criteria:
But I'm missing the default
return false;case in version with criteria, because this is not a valid code:Is there a way to create an "unmachable criteria"?
Thanks for help!
@porebskk commented on GitHub (Mar 22, 2017):
How about throwing an exception and catching it in the approriate level?