What is the rationale behind throwing an exeption in JPA, when something can't be found?
Added:
This behaviour was seen in EJB2, and has as far been removed from EJB3 - but... It remains when calling Query#getSingleResult() which throws a NoResultException.
Normally I would not expect it to be an exception that something could not be found. Actually this might me the default situation in some cases, and at leats the expected cases in most other sotuations. It makes me remeber an old saying that you should not use exceptions as part of your business logic, but only as what it is, special cases you don't know how or don't want to deal with.
Does anyone have an idea why it is implemented this way in JPA? What is the drawback on returning null when something could not be found?