I was using this Stackoverflow as an example:
Which looks like this:
$criteria = new \Doctrine\Common\Collections\Criteria();
$criteria->where($criteria->expr()->gt('prize', 200));
$result = $entityRepository->matching($criteria);
I would like to to use the max instead like this:
$criteria->where($criteria->expr()->max('prize'));
but get:
Attempted to call an undefined method named "max" of class "Doctrine\Common\Collections\ExpressionBuilder".
Any ideas?