public int createCountry(String countryCode) {
// TODO Auto-generated method stub
SqlSession session = null;
boolean commit = false;
int result = 0;
//System.out.println("바보 :" + countryCode);
try {
session = dbutil.getSqlSession();
result = session.update("board.updateIsCreate", countryCode);
} finally {
dbutil.closeSqlSession(session, commit);
}
System.out.println("count" + result);
return result;
}
Here's my DapIml.java
<update id="updateIsCreate" parameterType="String">
UPDATE country
SET isCreated = '1'
</update>
and, This is my mapper.xml.
I already checked update's return value is correct, but it has no effect in my database. isCreated value is not changed to '1'. Any suggestion on how to achieve this? I will appreciate for your help.
Sorry, I didn't write commit code...
I modified my daoImplement code like this :