I think you're loading a CourseCategoryDAO by primary key so you Can just use session.get(Class, Serializable) which will only ever return one item.