Hi, my problem is with transactions.
When i do call to deleteLocationsOfUser(3) the query execute inmediatly and never I can do rollback to transaction.
The code is:
@SuppressWarnings("unchecked") public int deleteLocationsOfUser(final Long locid){ int del = hibernateTemplate.execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException {
SQLQuery query = session.createSQLQuery("delete from LOCATION where LO_ID = :locid"); query.setLong("locid", locid); int del = query.executeUpdate(); return del; } }); return del; }
Do you know what could have being? Thank you. Jorge
|