How to get the most recently added row from a certain table, which satisfies a certain condition.
If I use javax/persistence/Query.html#getSingleResult() we get a NonUniqueResultException if there are multiple rows satisifying the query. I need the equivalent of findOne from the list. I would prefer not to paginate by setting the rowsPerPage as 1 and then fetch the resultSet.