Hibernate doesn\'t delete my row:
public boolean deleteVote(Login user, int pid){
Session session = getSession();
try{
String hql = \"del
From the Output you provided
uid: 123 and pid: 1
Hibernate: delete from votes where uid=? and pid=?
1
it is clear that query.executeUpdate()
is returning 1. The method returns
the number of entities updated or deleted. This means that 1 row has been updated or deleted, which is okay.
Try doing a session.flush()
to flush the session, or a session.evict()
to remove the object from the session.