I am a newbie in Java Spring and My Batis and I have a problem mapping the DB column that is a keyword in Oracle in MyBatis 3.4 XML file.
I am using Java Spring 2.2.11, Oracle 19C, and MyBatis 3.4.0.
Mapper XML file:
<resultMap id="regionResultMap" type="org.idashboard.entity.Region">
<id column="code" property="code"/>
<result column="parent_code" property="parentCode"/>
<result column="ancestors" property="ancestors"/>
<result column="name" property="name"/>
<result column="level" property="level"/>
<result column="sort" property="sort"/>
<result column="remark" property="remark"/>
</resultMap>
Generated SQL:
SELECT code,
parent_code,
ancestors,
name,
level,
sort,
remark
FROM region
WHERE code = '110102';
Error description: [Error] Execution (30: 8): ORA-01788: CONNECT BY clause required in this query block
The problem occurs because I used "LEVEL" column in region table.
How can I solve this issue? And how can I use column names that are the keywords in Oracle?
Thanks in advance!