 <p>Just to close the question.</p> <p>Answer : The update method was getting a wrong argument from its calling method. Hence the output was not as expected. Thanks for pointing out that there might not be any matches for the update statement.</p>