Ibator didn't generate Oracle varchar2 field
- by bugbug
I have table APP_REQ_APPROVE_COMPARE with following fields:
"ID" NUMBER NOT NULL ENABLE,
"TRACK_NO" VARCHAR2(20 BYTE) NOT NULL ENABLE,
"REQ_DATE" DATE NOT NULL ENABLE,
"OFFCODE" CHAR(6 BYTE) NOT NULL ENABLE,
"COMPARE_CASE_ID" NUMBER NOT NULL ENABLE,
"VEHICLE_NAME" VARCHAR2(100 BYTE),
"ENGINE_NO" VARCHAR2(100 BYTE),
"BODY_NO" VARCHAR2(100 BYTE),
"HOLD_SHIP" NUMBER,
"OWNERSHIP" VARCHAR2(200 BYTE),
"RENT_NAME" VARCHAR2(200 BYTE),
"CONTRACT" VARCHAR2(100 BYTE),
"CONTRACT_NO" VARCHAR2(100 BYTE),
"CONTRACT_DATE" DATE,
"ISLAWBREAKERRENT" CHAR(1 BYTE) NOT NULL ENABLE,
"MISTAKE_DETAIL" VARCHAR2(4000 BYTE),
"COMPARE_REASON" VARCHAR2(4000 BYTE),
"CREATE_BY" NUMBER NOT NULL ENABLE,
"CREATE_ON" DATE DEFAULT SYSDATE NOT NULL ENABLE,
"UPDATE_BY" NUMBER,
"UPDATE_ON" DATE,
When I generate a java bean using Ibator , I didn't find trackNo, VehicalName, ... (all fields defined as varchar2).
What is the problem in my case? Here is my Ibator configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ibatorConfiguration
PUBLIC "-//Apache Software Foundation//DTD Apache iBATIS Ibator Configuration 1.0//EN"
"http://ibatis.apache.org/dtd/ibator-config_1_0.dtd">
<ibatorConfiguration>
<classPathEntry location="/dos/connector/oracle_jdbc.jar"/>
<ibatorContext id="autoPerson" defaultModelType="flat"
targetRuntime="Ibatis2Java2">
<jdbcConnection
connectionURL="jdbc:oracle:thin:@192.168.42.144:1521:orcl"
driverClass="oracle.jdbc.driver.OracleDriver"
userId="user"
password="password"/>
<javaModelGenerator targetPackage="com.ko.model"
targetProject="FormConfig">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<sqlMapGenerator targetPackage="com.ko.map" targetProject="FormConfig">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<daoGenerator
targetPackage="com.ko.model.dao"
type="SPRING"
targetProject="FormConfig"
implementationPackage="com.ko.model.dao.impl" >
<property name="enableSubPackges" value="true"/>
<property name="methodNameCalculator" value="extended"/>
</daoGenerator>
<table tableName="APP_REQ_APPROVE_COMPARE"
domainObjectName="AppReqApproveCompare"/>
<ibatorConfiguration>