为什么hibernate SQL语句打印了 也返回true了 就是插入不了数据呢 20
//添加用户publicbooleanAddUser(TabUseruser){return(Integer)(getHibernateTemplate().save(u...
//添加用户
public boolean AddUser(TabUser user) {
return (Integer)(getHibernateTemplate().save(user))>0;
}
IMPL里的方法
public ActionForward AddUser(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
UserForm userForm=(UserForm)form;
if(userForm!=null){
TabUser user=userForm.getItem();
boolean i= userService.AddUser(user);
System.out.println(i);
}
return mapping.findForward("added");
}
ACTION里的
这个是数据库
调试的时候参数也都齐全 展开
public boolean AddUser(TabUser user) {
return (Integer)(getHibernateTemplate().save(user))>0;
}
IMPL里的方法
public ActionForward AddUser(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
UserForm userForm=(UserForm)form;
if(userForm!=null){
TabUser user=userForm.getItem();
boolean i= userService.AddUser(user);
System.out.println(i);
}
return mapping.findForward("added");
}
ACTION里的
这个是数据库
调试的时候参数也都齐全 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询