@Transactional
@Modifying
public boolean deleteBook(String callno, String studentid) {
boolean userFounds= false;
Session session=this.sessionFactory.openSession();
System.out.println("check update:"+callno);
System.out.println("check update:"+studentid);
// delete operation
String SQL_QUERY2 ="delete from IssueBook where callno= ? and studentid=?";
Query query= session.createQuery(SQL_QUERY2);
query.setParameter(0, callno).executeUpdate();
query.setParameter(1, studentid).executeUpdate();
return userFounds;
}
我在这里获得500服务器异常query.setParameter(0,callno).executeUpdate(); query.setParameter(1,studentid).executeUpdate();
请参阅stacktrace:
蝴蝶不菲
相关分类