Hi,
i am experimenting using Hibernate.
I am trying to get a User by id this is what i do
public User get(DetachedCriteria dc){
List<User> users = getHibernateTemplate().findByCriteria(dc);
if(users != null)
{
return users.get(0);
}
else return null;
}
but it fails when the user is not in the database. Could you help me to understand how to achieve this?
Thanks