I suppose this question would apply regardless of whether I was using
JDBC or an ORM, but since my DAO is Hibernate based, I'll ask here.
In my DAO class methods, if an item is not found, is it better practice to return null (to my service layer) or throw some type of "not found" exception?
Part of the reason I ask is that I'm trying to force myself to (finally) write
unit tests for my code, and I started asking which would be more testable. But, as we all know, good design practices can have many benefits.
Jason