Mybatis inserts the update to delete the data, but can not write to the database

mybatis to query the select operation

session.select("statement", "parament“);

success, you can get the results.

But when adding or deleting, only one sentence sesseion.[Operation]() can see success, but the database has not changed. Need a session.commit ();

SqlSession session =MybatisUtil.openSqlSession();
PhoneIdCode phoneIdCode = new PhoneIdCode(phone, Integer.parseInt(idCode));
session.insert("storeIdCode", phoneIdCode);	
session.commit();

reason:

jdbc provides two things to deal with, an automatic submission, a manual

commit, it is automatically submitted by default, using jdbc to perform There is no need to manually submit a single sql. But when jdbc is hosted on mybatis,

we need to submit it manually. The query does not change the database, and the other three operations will require commit to submit the database.