728x90
mybatis์์ ๋น๊ต ์ฐ์ฐ์ ์ฌ์ฉํ๋ ์ค์ ํน์๋ฌธ์ ์๋ฌ ๋ฐ์
<select id="selectA" resultMap="MemberResultMap">
select *
from A
where year < 2020
</select>
error : The content of elements must consist of well-formed character data or markup.
ํด๊ฒฐ๋ฐฉ๋ฒ
1. <![CDATA ]]> ์ฌ์ฉ
<select id="selectA" resultMap="MemberResultMap">
select *
from A
where year <![CDATA < ]]> 2020
</select>
2. < ์ฌ์ฉ
<select id="selectA" resultMap="MemberResultMap">
select *
from A
where year < 2020
</select>
> | > |
< | < |
>= | >= |
<= | <= |
์ฐธ๊ณ :
[Mybatis] ๋น๊ต์ฐ์ฐ์ ๋ถ๋ฑํธ >,< ์๋ ๋
์ฟผ๋ฆฌ๋ฅผ ์์ฑํ๋ค ๋ณด๋ฉด ๋ถ๋ฑํธ (>,<) ๋ฅผ ์ฌ์ฉํด์ผ ํ ๋๊ฐ ์๋ค. ๊ทธ๋ฌ๋ mybatis์์ ์ฌ์ฉํ๋ฉด ์๋ฌ๊ฐ ๋๋๋ฐ ์ด๋ ํด๊ฒฐ๋ฐฉ๋ฒ์ ์์ ๋ณด์. ์ฟผ๋ฆฌ์ ๋ถ๋ฑํธ ๊ธฐํธ๋ฅผ ์ฌ์ฉํ๋ฉด The content of elements must consist
yamea-guide.tistory.com
'DB' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[PostgreSQL]Error updating database. Cause: org.postgresql.util.PSQLException: ์ค๋ฅ: ๋ฆด๋ ์ด์ (relation) ์ ๊ทผ ๊ถํ ์์ (0) | 2021.10.08 |
---|---|
[PostgreSQL] DATE / TIME ๋ค๋ฃจ๊ธฐ (0) | 2021.09.02 |
[SQL] where์ 1=0 (false) ์ฌ์ฉ์์ (0) | 2021.07.09 |
[Oracle] ๋ค์ค LIKE OR / REGEXP_LIKE // IN (2) | 2021.06.29 |
[Oracle] ORA-01481: ์ซ์ ํ์ ๋ชจ๋ธ์ด ๋ถ์ ํฉํฉ๋๋ค (2) | 2021.06.02 |