ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanv <viv...@gmx.at>
Subject Re: aBator does not create getter and setter for new column in table
Date Mon, 16 Feb 2009 17:32:27 GMT

Sorry, the only warning is not just Statistics.java but also for the other
files. But I didnt paste them in all as they are all the same.

The config.xml is the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE abatorConfiguration
  PUBLIC "-//Apache Software Foundation//DTD Abator for iBATIS Configuration
1.0//EN"
  "http://ibatis.apache.org/dtd/abator-config_1_0.dtd">

<abatorConfiguration>
  <abatorContext id="OracleTables" generatorSet="Java5">
    <jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
        connectionURL="jdbc:oracle:thin:@127.0.0.1:1521:XE"
        userId="SOME_USER"
        password="some_pwd">
      <classPathEntry location="ojdbc14.jar" />
    </jdbcConnection>

    <javaTypeResolver >
      <property name="forceBigDecimals" value="false" />
    </javaTypeResolver>

    <javaModelGenerator targetPackage="com.tool.ibatis.model"
targetProject="ibatis\src\main\java">
      <property name="enableSubPackages" value="true" />
      <property name="trimStrings" value="true" />
    </javaModelGenerator>

    <sqlMapGenerator targetPackage="com.tool.ibatis.xml" 
targetProject="ibatis\src\main\resources">
      <property name="enableSubPackages" value="true" />
    </sqlMapGenerator>

    <daoGenerator type="GENERIC-SI" targetPackage="com.tool.ibatis.dao" 
targetProject="ibatis\src\main\java">
      <property name="enableSubPackages" value="true" />
    </daoGenerator>
 <table tableName="CUSTOMER"  >
      <property name="useActualColumnNames" value="true"/>
      <generatedKey column="CaseID" sqlStatement="Select caseid_seq.nextval
from dual"/>
    </table>

   <table tableName="PATCH"  >
     <property name="useActualColumnNames" value="true"/>
      <generatedKey column="PatchID" sqlStatement="Select
patchid_seq.nextval from dual"/>
    </table>
<table tableName="STATISTICS"  >
     <property name="useActualColumnNames" value="true"/>
      <generatedKey column="ID" sqlStatement="Select statistics_seq.nextval
from dual"/>
    </table>

  </abatorContext>
</abatorConfiguration>



Jeff Butler-2 wrote:
> 
> The only warning is that Statistics.java was overwritten.
> 
> It is a mystery.  Could we see your config.xml?
> 
> Jeff Butler
> 
> 
> On Mon, Feb 16, 2009 at 10:51 AM, sanv <viveks@gmx.at> wrote:
>>
>> If I run the following command in the command line: java -jar abator.jar
>> -configfile config.xml -overwrite
>> I get an output saying the files were overwritten:
>>
>> Existing file
>> C:\server\ibatis\src\main\java\com\tool\ibatis\model\Statistics.java was
>> overwritten
>> Abator finshed successfully, there were warninigs.
>>
>> This is all I get.
>>
>> thanks
>>
>>
>> Jeff Butler-2 wrote:
>>>
>>> Warnings are displayed differently depending on how you run Abator...
>>>
>>> 1. They could be written to System.out if you are running from the
>>> command
>>> line
>>> 2. They can be logged to the Ant console if you are using Ant
>>> 3. They will be displayed in the completion dialog box if you are
>>> running in Eclipse
>>>
>>> Jeff Butler
>>>
>>>
>>> On Mon, Feb 16, 2009 at 10:33 AM, sanv <viveks@gmx.at> wrote:
>>>>
>>>> 1. The classes are regenerated and the timestamp is also updated.
>>>> 2. The new field is added.
>>>> 3. I have tried using different datatypes (Oracle: VARCHAR2, CHAR and
>>>> NUMBER)
>>>> 4. There are warnings, but how can I display the warnings?
>>>>
>>>> thanks in advance.
>>>>
>>>>
>>>> Jeff Butler-2 wrote:
>>>>>
>>>>> Not much to go on here - we probably need more information.
>>>>>
>>>>> Some questions...
>>>>>
>>>>> 1. Are you sure the classes are regenerated (the comment timestamp
>>>>> will help you know for sure)?
>>>>> 2. Are you sure the new field is added to the table in the correct
>>>>> schema?
>>>>> 3. What is the data type of the new field?
>>>>> 4. Were there any Abator warnings?
>>>>>
>>>>> Jeff Butler
>>>>>
>>>>>
>>>>> On Mon, Feb 16, 2009 at 2:12 AM, sanv <viveks@gmx.at> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have a (old) version of abator running for my project.
>>>>>> For some reason when i add a new column to a specific table in my
db
>>>>>> and
>>>>>> compile the java classes the new column does not get added to the
>>>>>> corresponding java class. however, if i add a new column to another
>>>>>> table
>>>>>> in
>>>>>> the same database and compile/build the classes the new getter and
>>>>>> setter
>>>>>> method is added to the class.
>>>>>>
>>>>>> what could be the problem in this case?
>>>>>>
>>>>>> thanks for any help.
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22033078.html
>>>>>> Sent from the iBATIS - User - Java mailing list archive at
>>>>>> Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22040640.html
>>>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22040983.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22041937.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message