Can HQL queries do this?
“get the UserEntity where the property creationTimestamp is the most recent of all UserEntities”.
Essentially a query to return the “newest user” in our program where each UserEntity has a field mapped to a timestamp column in our database.
The HQL query to list the users from newest first is:
Use
setMaxResultsto limit the result set to just one user.