Mysql Update query notupdating on the first time

24 views Asked by At
ctx1 = CustomerUtils.getServiceExecutionContextForCustomer(customerId);
String deleteManagerQuery = "UPDATE t_user_groups SET group_manager_id=? WHERE id=? AND ARCHIVE=FALSE";
int numOfRowsAff=ctx1.getSession().createSQLQuery(deleteManagerQuery).setParameter(0, null).setParameter(1, grpId).executeUpdate();
if (ctx1 != null && ctx1.getSession().isConnected())
    ctx1.teardownNormal();

Updatequery not working first time, but getting updated if it is ran second time.If I'm executing the same code in main method it is working. But from UI When I'm checking it isnot getting updated for the first time. If I again execute, it will update the value.

0

There are 0 answers