티스토리 뷰

직접 primary key로 조회

Employee employee = (Employee) getSession().get(Employee.class, id);





조건생성

Criteria criteria = getSession().createCriteria(Employee.class);
criteria.add(Restrictions.eq("ssn", ssn));
return (Employee) criteria.uniqueResult();


댓글
댓글쓰기 폼