2

我有以下字段的表 APP_REQ_APPROVE_COMPARE:

"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,

当我使用 Ibator 生成一个 java bean 时,我没有找到 trackNo, VehicalName, ...(所有字段都定义为 varchar2)。

我的情况有什么问题?这是我的 Ibator 配置文件:

<?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>
4

1 回答 1

1

Ibator 版本 1.2.0,错误修复:修复了 JavaTypeResolver,以便可以通过配置覆盖具有不受支持的数据类型的列。

于 2010-02-18T14:41:16.560 回答