如何使用Hibernate模板 THI是HQL语句 “更新登录设置empSmartId = 48750005” +”,其中empPassword = 6328ef1675ddb7106eba8dc2661961d7" 使用getHibernatetemplate的HibernateTemplate更新查询
()
当前代码使用HQL更新查询:
public class LoginDaoImp extends HibernateDaoSupport implements LoginDao {
public boolean resetAttempt(Login login) {
try { login.setAttempt(0);
getHibernateTemplate().update(login);
return true;
} catch (Exception e) { e.printStackTrace(); }
return false; }
i can save whole pojo class above code work but i want to use where condition to update only hibernateTemplate to update the data
你有尝试过自己吗?显示你的努力,并告诉我们出了什么问题,我们可能会帮助你。 – mthmulders
sir List l1 = getHibernateTemplate()。find(“from Login”);这将返回所有我想知道如何使用此更新的数据登录设置empSmartId = 48750005“+”其中empPassword = 6328ef1675ddb7106eba8dc2661961d7“ – matrix
这行代码不会执行任何与更新有关的任何操作。 “已经显示先前的研究和努力的零证据的部分 – mthmulders