By "craps out" I meant topic is returned as NULL and I had to do
Topic topic = TopicRepository.getTopic(new Topic(p.getTopicId()));
if (topic == null) {
topic = DataAccessDriver.getInstance().newTopicDAO().selectRaw(p.getTopicId());
}
IMO, the app layer shouldn't need to worry about this. When it asks for a legitimate Topic, TopicRepository should do all the heavy lifting and refill the tank when the
water is empty. Now this checking is littered all over the place...
[originally posted on jforum.net by Anonymous]