Closed gavinking closed 12 months ago
Shouldn't it rather be something like this?
default T getSingleResultOrNull() {
try {
return getSingleResult();
} catch (NoResultException e) {
return null;
}
}
Given that getResultStream
was also added with a default implementation.
Shouldn't it rather be something like this?
Sure, we could do that.
:+1:
add to changelog
Done.
This is ready to merge.
Adds the new method I proposed in this discussion: https://github.com/jakartaee/persistence/issues/298#issuecomment-736682475.