I have recently upgraded to 3.5.6 and I came across a small delete query in my application which is not working anymore..where im trying to delete a record.
Line1 MyInstance reportInstance = (MyInstance ) HibernateUtility.currentSession().load(MyInstance .class, reportInstanceId); Line2 HibernateUtility.currentSession().delete(reportInstance);
Line 1 can not find the actual record from the DB (tried MSSQL, Oracle) so can not delete but if I use LockMode.UPGRADE_NOWAIT HB, Line 1 returns me the correct record but then my delete still doesnt work.
I had to surround this 2 lines with begin and commit transactions then things works properly. I dont understand the behavior ...this code was running fine in old HB libraries before.
Can anyone help me understand this ?
thanks g
|