Category: myBatis

0

myBatis에서 null과 nullString을 체크할 때

myBatis에서 null과 nullString을 체크할 때myBatis를 사용할 때 if문에서 null과 nullString을 체크할 때가 있습니다. 123<if test="!test.equals('') and test!=null">WHERE TEST_NAME = #{test}</if> test변수가 null이나 n

0

1=1 조건을 넣는 이유

myBatis 쿼리에서 1=1 조건을 넣는 이유myBatis 쿼리문을 볼때, 가끔씩 where 1=1 이라는 조건을 볼 수 있습니다. 1234567891011121314<select id="getUserList" resultMap="userSelectMap"> SELECT TAG_ID, CONT_ID, TAG_STR, TAG_USER FRO

0

myBatis에서 insert 후 원하는 컬럼 select 해오기

myBatis에서 insert 후 원하는 컬럼 select 해오기코딩을 하면서 insert후에 insert한 컬럼의 값을 가져올 일이 있습니다.이때 keyProperty를 이용하면 insert 후 return값으로 int값이 아닌원하는 컬럼의 값을 return받을 수 있습니다. 1234567891011121314151617181920<insert id