[samigo-team] use of hibernatetemplate.load

David Horwitz david.horwitz at uct.ac.za
Thu May 9 04:22:22 PDT 2013


Hi All,

There are a number of call in the DAO layer (*FacadeQueries), that retrieve an ibject by id by calling:

getHibernateTemplate().load(

as a result if an unknownid is passed an unchecked org.hibernate.ObjectNotFoundException is thrown that escalates to the portal error handler. Now I'm not sure but it would seem that

getHibernateTemplate().get(

is more inline with the expected behaviour as it returns null rather than an error. Am I correct in this?

Regards

David


________________________________
UNIVERSITY OF CAPE TOWN

This e-mail is subject to the UCT ICT policies and e-mail disclaimer published on our website at http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from +27 21 650 9111. This e-mail is intended only for the person(s) to whom it is addressed. If the e-mail has reached you in error, please notify the author. If you are not the intended recipient of the e-mail you may not use, disclose, copy, redirect or print the content. If this e-mail is not related to the business of UCT it is sent by the sender in the sender's individual capacity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/samigo-team/attachments/20130509/494d16ad/attachment.html 


More information about the samigo-team mailing list