-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
7
-
x86
-
windows_7
A DESCRIPTION OF THE REQUEST :
getSingleResult() throws a NoResultException when no rows are found.
Please add a
1. javax.persistence.Query.getSingleResult(Object defaultValue)
2. javax.persistence.TypedQuery.getSingleResult(X defaultValue)
JUSTIFICATION :
The NoResultException when no rows found is a behavior accepted by many but also irritating to many others who would expect a null return value.
I think adding these method will be a win-win situation and will also add additional functionality of returning a not null default value in case of no rows found.
getSingleResult() throws a NoResultException when no rows are found.
Please add a
1. javax.persistence.Query.getSingleResult(Object defaultValue)
2. javax.persistence.TypedQuery.getSingleResult(X defaultValue)
JUSTIFICATION :
The NoResultException when no rows found is a behavior accepted by many but also irritating to many others who would expect a null return value.
I think adding these method will be a win-win situation and will also add additional functionality of returning a not null default value in case of no rows found.