-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Row in a mysql table not really deleted
PostPosted: Wed Oct 06, 2010 2:40 pm 
Newbie

Joined: Wed Oct 06, 2010 2:12 pm
Posts: 1
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.