We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add getExistsResult method.
getExistsResult
It would be nice to have method that checks that result of query is exists.
Now:
public function isExists(int $id): bool { $queryBuilder = $this->entityRepository->createQueryBuilder('f'); $exists = $queryBuilder ->select('1') ->where('f.id = :id') ->setParameter('id', $id) ->getQuery() ->getOneOrNullResult() ; if (is_null($exists)) { return false; } return true; }
After:
public function isExists(int $id): bool { $queryBuilder = $this->entityRepository->createQueryBuilder('f'); return $queryBuilder ->where('f.id = :id') ->setParameter('id', $id) ->getQuery() ->getExistsResult() ; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature Request
Add
getExistsResult
method.Summary
It would be nice to have method that checks that result of query is exists.
Now:
After:
The text was updated successfully, but these errors were encountered: