StringBuilder sb = new StringBuilder();
sb.append("UPDATE " + logDbName + ".activity a "); "
sb.append("SET a.type = 3 ");
sb.append("WHERE a.id = 3 ");
System.out.println(sb.toString());
SQLQuery queryObject = getSession(configFile).createSQLQuery(sb.toString());
int count = queryObject.executeUpdate();
这里count 返回的是1 说明已经更新成功 但是数据库对应的表没有更新 求解
sb.append("UPDATE " + logDbName + ".activity a "); "
sb.append("SET a.type = 3 ");
sb.append("WHERE a.id = 3 ");
System.out.println(sb.toString());
SQLQuery queryObject = getSession(configFile).createSQLQuery(sb.toString());
int count = queryObject.executeUpdate();
这里count 返回的是1 说明已经更新成功 但是数据库对应的表没有更新 求解