Java with hibenate
===

I have a code which updates a coloumn in database which looks like this

logger.info("Entering Update Method");
		Query query =session.createQuery("update CardMaster cm set cm.otpAmount = :otpAmount" + " where cm.cardNumber = :cardnumber");
		double otpAmount= cardMaster.getOtpAmount();
		String cardNumber=cardMaster.getCardNumber();
		query.setParameter("otpAmount",otpAmount);
		query.setParameter("cardnumber",cardNumber);
		query.executeUpdate();
		logger.info("cardMasterUpdated successfully");

in this i am getting otpamount ,cardnumber and it is giving result of executeupdate as 1 but it is not reflecting in Database .. i am openig the session and commiting correctly outside .

but instead of using this if i  use update() of hibernate it is happening correctly
can you help me out of this
