From: Gavin_King/Cirrus%<CI...@ci...> - 2002-05-08 06:01:17
|
Yeah, that is the assumption. Nevertheless, your suggestion is a good one and we should add ObjectNotFoundException ASAP. I would also like to add StaleDataException when version checking fails. Can anyone think of any other cases like this? If Brad doesn't make this change in CVS, I will make it sometime in the next couple of days.... Gavin > it appears that session.load throws a HibernateException if an object > with the supplied id doesn't exist. would it be better for hibernate to > throw a different exception in this case (say an ObjectNotFoundException > that extends HibernateException), to differentiate between the object > not existing and some other error? or is the expectation simply that a > find query is to be used if u r not sure if a particular persisted > object exists? |