日期:2014-05-17 浏览次数:20722 次
Query q = session.createQuery("update User u set u.birthday=:bday , u.realName=:rn , u.sex=:sex , u.birthPlace=:bP , u.livePlace=:lp , u.bloodType=:bt where u.username=:username "); q.setParameter("bday", u.getBirthday()); q.setParameter("rn", u.getRealName()); q.setParameter("sex", u.getSex()); q.setParameter("bP", u.getBirthPlace()); q.setParameter("lp", u.getLivePlace()); q.setParameter("bt", u.getBloodType()); q.setParameter("username", u.getUsername()); q.executeUpdate();