Hello,
I'm trying to fix some code I inherited - this is my first experience with Hibernate. I'm trying to delete a row from a mysql table, but the row does not get deleted. Instead, most of the values in the columns are changed to NULL. Has anyone seen this, or know what the problem might be? I'm using Hibernate 3 and mysql version is 4.1.20. I can delete the row from the mysql command line with no trouble.
I'm using what appears to be standard methods for deleting the row:
Transaction tx = NULL; tx = session.beginTransaction(); SQLQuery q = session.SQLQuery("delete from TABLE where x = :x")'; q.setParameter("x", x); int rowCount = q.executeUpdate(); tx.commit();
Any help is appreciated.
Mike W.
|