You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by "Paymer, Richard (MSCIBARRA)" <Ri...@mscibarra.com> on 2008/03/06 19:05:41 UTC

Compilation errors in Torque generated Base classes

I am new to Torque, so I may well be doing something wrong.

 

Torque is consistently generating Base classes that won't compile for
me.

 

As an example, when I generate a table called Provider, I get a
BaseProvider.java file.  It has the following bit of code in it:

 

    /**

     * A wrapper for getFields(new Criteria())

     *

     * @return the collection of associated objects

     */

    public List<Field> getFields()

    {

        return getFields(new Criteria(10));

    }

 

    /**

     * If this Provider has previously

     * been saved, it will retrieve related Fields from storage.

     * If this Provider is new, it will return

     * an empty collection or the current collection, the criteria

     * is ignored on a new object.

     *

     * @throws TorqueException

     */

    public List<Field> getFields(Criteria criteria) throws
TorqueException

    {

                criteria.add(FieldPeer.PROVIDERID, getProviderid());

                return FieldPeer.doSelect(criteria);

    }

 

This doesn't compile because the getFields() method declaration doesn't
indicate that it can throw a TorqueException.

 

I am using the following build.properties:

 

  torque.addGetByNameMethod = false

  torque.addIntakeRetrievable = false

  torque.addSaveMethod = true

  torque.addTimeStamp = true

  torque.basePrefix = Base

  torque.complexObjectModel = true

  torque.useClasspath = true

  torque.useManagers = false

  torque.objectIsCaching = false

  torque.silentDbFetch = false

  torque.generateBeans = false

  torque.beanSuffix = Bean

  torque.enableJava5Features = true

 

And the Provider table declaration looks like this:

 

<table name="Provider" idMethod="native"

       description="Maps a ProviderName + ModelID to a ProviderID">

    <column

            name="ProviderID"

            required="true"

            primaryKey="true"

            type="BIGINT"

            description="ProviderID"/>

    <column

            name="ModelID"

            required="true"

            type="BIGINT"

            description="ModelID"/>

    <column

            name="ProviderName"

            required="true"

            type="VARCHAR"

            size="128"

            description="ProviderName"/>

    <foreign-key foreignTable="Model" onDelete="cascade">

        <reference

                local="ModelID"

                foreign="ModelID"/>

    </foreign-key>

    <unique name="uxProvider_ModelID_Name">

        <unique-column name="ModelID"/>

        <unique-column name="ProviderName"/>

    </unique>

    <index name="ixProvider_ModelID_Name">

        <index-column name="ModelID"/>

        <index-column name="ProviderName"/>

    </index>

</table>

 

The field table has a foreign key to the Provider table:

 

<table name="Field" idMethod="native"

       description="Maps a ProviderID + ModelID + FieldName +
Granularity to a FieldID">

    <column

            name="FieldID"

            required="true"

            primaryKey="true"

            type="BIGINT"

            description="FieldID"/>

    <column

            name="ProviderID"

            required="true"

            type="BIGINT"

            description="ProviderID"/>

            

    <Other column definitions omittted... />

    

    <foreign-key foreignTable="Provider" onDelete="cascade">

        <reference

                local="ProviderID"

                foreign="ProviderID"/>

    </foreign-key>

</table>

 

If I hand edit the generated code to add "throws TorqueException" in the
appropriate places, the application seems to run fine.

 

Am I doing anything obviously wrong?
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

RE: Compilation errors in Torque generated Base classes

Posted by Thomas Fischer <fi...@seitenbau.net>.
Hm, but it is a legal setting to have torque.objectIsCaching=false, so it
should produce workong code...

Would you mind to add an jira entry ?

    thanks,

          Thomas

"Paymer, Richard \(MSCIBARRA\)" <Ri...@mscibarra.com> schrieb am
12.03.2008 17:06:12:

> Answering my own question here.... This looks like a bug in the Torque
> code generator.
>
> It appears that it generates invalid Java files if the following
> property is set:
>
>   torque.objectIsCaching = false
>
> Setting that to true corrects the problem.
>
>
> -----Original Message-----
> From: Paymer, Richard (MSCIBARRA)
> Sent: Thursday, March 06, 2008 10:06 AM
> To: torque-user@db.apache.org
> Subject: Compilation errors in Torque generated Base classes
>
> I am new to Torque, so I may well be doing something wrong.
>
> Torque is consistently generating Base classes that won't compile for
> me.
>
> As an example, when I generate a table called Provider, I get a
> BaseProvider.java file.  It has the following bit of code in it:
>
>     /**
>      * A wrapper for getFields(new Criteria())
>      *
>      * @return the collection of associated objects
>      */
>     public List<Field> getFields()
>     {
>         return getFields(new Criteria(10));
>     }
>
>     /**
>      * If this Provider has previously
>      * been saved, it will retrieve related Fields from storage.
>      * If this Provider is new, it will return
>      * an empty collection or the current collection, the criteria
>      * is ignored on a new object.
>      *
>      * @throws TorqueException
>      */
>     public List<Field> getFields(Criteria criteria) throws
> TorqueException
>     {
>                 criteria.add(FieldPeer.PROVIDERID, getProviderid());
>                 return FieldPeer.doSelect(criteria);
>     }
>
> This doesn't compile because the getFields() method declaration doesn't
> indicate that it can throw a TorqueException.
>
> I am using the following build.properties:
>
>   torque.addGetByNameMethod = false
>   torque.addIntakeRetrievable = false
>   torque.addSaveMethod = true
>   torque.addTimeStamp = true
>   torque.basePrefix = Base
>   torque.complexObjectModel = true
>   torque.useClasspath = true
>   torque.useManagers = false
>   torque.objectIsCaching = false
>   torque.silentDbFetch = false
>   torque.generateBeans = false
>   torque.beanSuffix = Bean
>   torque.enableJava5Features = true
>
> And the Provider table declaration looks like this:
>
> <table name="Provider" idMethod="native"
>        description="Maps a ProviderName + ModelID to a ProviderID">
>     <column
>             name="ProviderID"
>             required="true"
>             primaryKey="true"
>             type="BIGINT"
>             description="ProviderID"/>
>     <column
>             name="ModelID"
>             required="true"
>             type="BIGINT"
>             description="ModelID"/>
>     <column
>             name="ProviderName"
>             required="true"
>             type="VARCHAR"
>             size="128"
>             description="ProviderName"/>
>     <foreign-key foreignTable="Model" onDelete="cascade">
>         <reference
>                 local="ModelID"
>                 foreign="ModelID"/>
>     </foreign-key>
>     <unique name="uxProvider_ModelID_Name">
>         <unique-column name="ModelID"/>
>         <unique-column name="ProviderName"/>
>     </unique>
>     <index name="ixProvider_ModelID_Name">
>         <index-column name="ModelID"/>
>         <index-column name="ProviderName"/>
>     </index>
> </table>
>
> The field table has a foreign key to the Provider table:
>
> <table name="Field" idMethod="native"
>        description="Maps a ProviderID + ModelID + FieldName +
> Granularity to a FieldID">
>     <column
>             name="FieldID"
>             required="true"
>             primaryKey="true"
>             type="BIGINT"
>             description="FieldID"/>
>     <column
>             name="ProviderID"
>             required="true"
>             type="BIGINT"
>             description="ProviderID"/>
>
>     <Other column definitions omittted... />
>
>     <foreign-key foreignTable="Provider" onDelete="cascade">
>         <reference
>                 local="ProviderID"
>                 foreign="ProviderID"/>
>     </foreign-key>
> </table>
>
> If I hand edit the generated code to add "throws TorqueException" in the
> appropriate places, the application seems to run fine.
>
> Am I doing anything obviously wrong?
> --------------------------------------------------------
>
> NOTICE: If received in error, please destroy and notify sender. Sender
does
> not intend to waive confidentiality or privilege. Use of this email is
> prohibited when received in error.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: Compilation errors in Torque generated Base classes

Posted by "Paymer, Richard (MSCIBARRA)" <Ri...@mscibarra.com>.
Answering my own question here.... This looks like a bug in the Torque
code generator.

It appears that it generates invalid Java files if the following
property is set:

  torque.objectIsCaching = false

Setting that to true corrects the problem.


-----Original Message-----
From: Paymer, Richard (MSCIBARRA) 
Sent: Thursday, March 06, 2008 10:06 AM
To: torque-user@db.apache.org
Subject: Compilation errors in Torque generated Base classes

I am new to Torque, so I may well be doing something wrong.
 
Torque is consistently generating Base classes that won't compile for
me.
 
As an example, when I generate a table called Provider, I get a
BaseProvider.java file.  It has the following bit of code in it:
 
    /**
     * A wrapper for getFields(new Criteria())
     *
     * @return the collection of associated objects
     */
    public List<Field> getFields()
    {
        return getFields(new Criteria(10));
    }
 
    /**
     * If this Provider has previously
     * been saved, it will retrieve related Fields from storage.
     * If this Provider is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List<Field> getFields(Criteria criteria) throws
TorqueException
    {
                criteria.add(FieldPeer.PROVIDERID, getProviderid());
                return FieldPeer.doSelect(criteria);
    }
 
This doesn't compile because the getFields() method declaration doesn't
indicate that it can throw a TorqueException.
 
I am using the following build.properties:
 
  torque.addGetByNameMethod = false
  torque.addIntakeRetrievable = false
  torque.addSaveMethod = true
  torque.addTimeStamp = true
  torque.basePrefix = Base
  torque.complexObjectModel = true
  torque.useClasspath = true
  torque.useManagers = false
  torque.objectIsCaching = false
  torque.silentDbFetch = false
  torque.generateBeans = false
  torque.beanSuffix = Bean
  torque.enableJava5Features = true
 
And the Provider table declaration looks like this:
 
<table name="Provider" idMethod="native"
       description="Maps a ProviderName + ModelID to a ProviderID">
    <column
            name="ProviderID"
            required="true"
            primaryKey="true"
            type="BIGINT"
            description="ProviderID"/>
    <column
            name="ModelID"
            required="true"
            type="BIGINT"
            description="ModelID"/>
    <column
            name="ProviderName"
            required="true"
            type="VARCHAR"
            size="128"
            description="ProviderName"/>
    <foreign-key foreignTable="Model" onDelete="cascade">
        <reference
                local="ModelID"
                foreign="ModelID"/>
    </foreign-key>
    <unique name="uxProvider_ModelID_Name">
        <unique-column name="ModelID"/>
        <unique-column name="ProviderName"/>
    </unique>
    <index name="ixProvider_ModelID_Name">
        <index-column name="ModelID"/>
        <index-column name="ProviderName"/>
    </index>
</table>
 
The field table has a foreign key to the Provider table:
 
<table name="Field" idMethod="native"
       description="Maps a ProviderID + ModelID + FieldName +
Granularity to a FieldID">
    <column
            name="FieldID"
            required="true"
            primaryKey="true"
            type="BIGINT"
            description="FieldID"/>
    <column
            name="ProviderID"
            required="true"
            type="BIGINT"
            description="ProviderID"/>
            
    <Other column definitions omittted... />
    
    <foreign-key foreignTable="Provider" onDelete="cascade">
        <reference
                local="ProviderID"
                foreign="ProviderID"/>
    </foreign-key>
</table>
 
If I hand edit the generated code to add "throws TorqueException" in the
appropriate places, the application seems to run fine.
 
Am I doing anything obviously wrong?
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: Compilation errors in Torque generated Base classes

Posted by "Paymer, Richard (MSCIBARRA)" <Ri...@mscibarra.com>.
Answering my own question here.... This looks like a bug in the Torque
code generator.

It appears that it generates invalid Java files if




-----Original Message-----
From: Paymer, Richard (MSCIBARRA) 
Sent: Thursday, March 06, 2008 10:06 AM
To: torque-user@db.apache.org
Subject: Compilation errors in Torque generated Base classes

I am new to Torque, so I may well be doing something wrong.
 
Torque is consistently generating Base classes that won't compile for
me.
 
As an example, when I generate a table called Provider, I get a
BaseProvider.java file.  It has the following bit of code in it:
 
    /**
     * A wrapper for getFields(new Criteria())
     *
     * @return the collection of associated objects
     */
    public List<Field> getFields()
    {
        return getFields(new Criteria(10));
    }
 
    /**
     * If this Provider has previously
     * been saved, it will retrieve related Fields from storage.
     * If this Provider is new, it will return
     * an empty collection or the current collection, the criteria
     * is ignored on a new object.
     *
     * @throws TorqueException
     */
    public List<Field> getFields(Criteria criteria) throws
TorqueException
    {
                criteria.add(FieldPeer.PROVIDERID, getProviderid());
                return FieldPeer.doSelect(criteria);
    }
 
This doesn't compile because the getFields() method declaration doesn't
indicate that it can throw a TorqueException.
 
I am using the following build.properties:
 
  torque.addGetByNameMethod = false
  torque.addIntakeRetrievable = false
  torque.addSaveMethod = true
  torque.addTimeStamp = true
  torque.basePrefix = Base
  torque.complexObjectModel = true
  torque.useClasspath = true
  torque.useManagers = false
  torque.objectIsCaching = false
  torque.silentDbFetch = false
  torque.generateBeans = false
  torque.beanSuffix = Bean
  torque.enableJava5Features = true
 
And the Provider table declaration looks like this:
 
<table name="Provider" idMethod="native"
       description="Maps a ProviderName + ModelID to a ProviderID">
    <column
            name="ProviderID"
            required="true"
            primaryKey="true"
            type="BIGINT"
            description="ProviderID"/>
    <column
            name="ModelID"
            required="true"
            type="BIGINT"
            description="ModelID"/>
    <column
            name="ProviderName"
            required="true"
            type="VARCHAR"
            size="128"
            description="ProviderName"/>
    <foreign-key foreignTable="Model" onDelete="cascade">
        <reference
                local="ModelID"
                foreign="ModelID"/>
    </foreign-key>
    <unique name="uxProvider_ModelID_Name">
        <unique-column name="ModelID"/>
        <unique-column name="ProviderName"/>
    </unique>
    <index name="ixProvider_ModelID_Name">
        <index-column name="ModelID"/>
        <index-column name="ProviderName"/>
    </index>
</table>
 
The field table has a foreign key to the Provider table:
 
<table name="Field" idMethod="native"
       description="Maps a ProviderID + ModelID + FieldName +
Granularity to a FieldID">
    <column
            name="FieldID"
            required="true"
            primaryKey="true"
            type="BIGINT"
            description="FieldID"/>
    <column
            name="ProviderID"
            required="true"
            type="BIGINT"
            description="ProviderID"/>
            
    <Other column definitions omittted... />
    
    <foreign-key foreignTable="Provider" onDelete="cascade">
        <reference
                local="ProviderID"
                foreign="ProviderID"/>
    </foreign-key>
</table>
 
If I hand edit the generated code to add "throws TorqueException" in the
appropriate places, the application seems to run fine.
 
Am I doing anything obviously wrong?
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Duplicate references in the foreign-key

Posted by Jim <sm...@yahoo.com>.
Hi Philip,
That's the thing.. There is only one foreigh key but
ant creates 2 identical ones in the schema.xml file.
And not just for those two tables but in many.
I suspect something on the DB2 side changed since the
way we generate the schema file has not changed. 

At the same time the default values for many columns
are now showing static values that do not exist.
Odd... 
Jim

--- Philip Reimann <re...@synyx.de> wrote:

> There's no chance to use version 3.2-rc2 for this
> demand. The
> torque-generator wont create correct files.
> You have to use version 3.2-rc3 (or higher) to set
> two foreign keys from
> one table to one other table.
> 
> Greetings Philip
> 
> Jim schrieb:
> > Hi,
> > I started running into a duplicate reference in
> the
> > foreign-key issue several months ago in the ant
> > generated schema.xml file. 
> > We are still using the 3.2 rc2 version of Torque
> and
> > the tables are DB2.
> > 
> > Here is an example of the dup reference..
> > <foreign-key foreignTable="TABLE2">
> >    <reference foreign="OFFRG_N" local="OFFRG_N"/>
> >    <reference foreign="OFFRG_N" local="OFFRG_N"/>
> > </foreign-key>
> > 
> > Here is a portion the table that has the
> forigh-key..
> > <table name="TABLE2">
> >         <column name="OFFRG_N" primaryKey="true"
> > required="true" size="12" type="CHAR"/>
> > 
> > The dba's swear there have been no changes to the
> DB2
> > tables. 
> > 
> > Thanks for any suggestions!
> > Jim
> > 
> > 
> >      
>
____________________________________________________________________________________
> > Be a better friend, newshound, and 
> > know-it-all with Yahoo! Mobile.  Try it now. 
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> 
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail:
> torque-user-help@db.apache.org
> > 
> > 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> torque-user-help@db.apache.org
> 
> 



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Duplicate references in the foreign-key

Posted by Philip Reimann <re...@synyx.de>.
There's no chance to use version 3.2-rc2 for this demand. The
torque-generator wont create correct files.
You have to use version 3.2-rc3 (or higher) to set two foreign keys from
one table to one other table.

Greetings Philip

Jim schrieb:
> Hi,
> I started running into a duplicate reference in the
> foreign-key issue several months ago in the ant
> generated schema.xml file. 
> We are still using the 3.2 rc2 version of Torque and
> the tables are DB2.
> 
> Here is an example of the dup reference..
> <foreign-key foreignTable="TABLE2">
>    <reference foreign="OFFRG_N" local="OFFRG_N"/>
>    <reference foreign="OFFRG_N" local="OFFRG_N"/>
> </foreign-key>
> 
> Here is a portion the table that has the forigh-key..
> <table name="TABLE2">
>         <column name="OFFRG_N" primaryKey="true"
> required="true" size="12" type="CHAR"/>
> 
> The dba's swear there have been no changes to the DB2
> tables. 
> 
> Thanks for any suggestions!
> Jim
> 
> 
>       ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Duplicate references in the foreign-key

Posted by Jim <sm...@yahoo.com>.
Interesting.. I didn't know that was possible. I'll
contact the dba and to verify.
Thanks!

 
--- Martin Tilsted <ti...@daimi.au.dk> wrote:

> I had a similary problem with mysql 5.0.27 My
> problem was that i did
> alter table MyTable add foreign key ...
> twice. This caused mysql to add the key twice,
> instead of detecting that 
> it's already there and do nothing.
> And this caused torque to generate the same
> <foreign-key> twice which 
> caused problems.
> 
> My solution was simply to drop the foreign key.
> (This caused both keys 
> to be dropped) and then just added
> the foreign key once.
> 
> Jim wrote:
> > Thomas,
> >
> > The standard process except we are still using Ant
> to
> > generate the schema file using the ant command ant
> -f
> > build-torque.xml jdbc.
> > That's it. The file generated has the dup
> references.
> > The source is mainframe DB2.
> > We have not changed anything rcently except moving
> to
> > the 3.2 rc2 version of Torque when it became
> > available. But that is not the issue.
> >
> > I suspect something is different on the DB2 side
> but
> > the dba's say no. And that's probably where the
> issue
> > is and I'm hoping someone ran into the same issue
> and
> > can give me a clue as to what I can look for to
> find
> > the issue.
> >
> > Jim 
> >
> >
> > --- Thomas Fischer <fi...@seitenbau.net> wrote:
> >
> >   
> >> Could you please give a short description of what
> >> you do ? I don't have a
> >> clue.
> >>
> >>     Thomas
> >>
> >> Jim <sm...@yahoo.com> schrieb am 06.03.2008
> >> 19:22:32:
> >>
> >>     
> >>> Hi,
> >>> I started running into a duplicate reference in
> >>>       
> >> the
> >>     
> >>> foreign-key issue several months ago in the ant
> >>> generated schema.xml file.
> >>> We are still using the 3.2 rc2 version of Torque
> >>>       
> >> and
> >>     
> >>> the tables are DB2.
> >>>
> >>> Here is an example of the dup reference..
> >>> <foreign-key foreignTable="TABLE2">
> >>>    <reference foreign="OFFRG_N"
> local="OFFRG_N"/>
> >>>    <reference foreign="OFFRG_N"
> local="OFFRG_N"/>
> >>> </foreign-key>
> >>>
> >>> Here is a portion the table that has the
> >>>       
> >> forigh-key..
> >>     
> >>> <table name="TABLE2">
> >>>         <column name="OFFRG_N" primaryKey="true"
> >>> required="true" size="12" type="CHAR"/>
> >>>
> >>> The dba's swear there have been no changes to
> the
> >>>       
> >> DB2
> >>     
> >>> tables.
> >>>
> >>> Thanks for any suggestions!
> >>> Jim
> >>>       
> >>
> >>     
> >
>
---------------------------------------------------------------------
> >   
> >> To unsubscribe, e-mail:
> >> torque-user-unsubscribe@db.apache.org
> >> For additional commands, e-mail:
> >> torque-user-help@db.apache.org
> >>
> >>
> >>     
> >
> >
> >
> >      
>
____________________________________________________________________________________
> > Be a better friend, newshound, and 
> > know-it-all with Yahoo! Mobile.  Try it now. 
>
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> 
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail:
> torque-user-help@db.apache.org
> >   
> 
> 



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Duplicate references in the foreign-key

Posted by Martin Tilsted <ti...@daimi.au.dk>.
I had a similary problem with mysql 5.0.27 My problem was that i did
alter table MyTable add foreign key ...
twice. This caused mysql to add the key twice, instead of detecting that 
it's already there and do nothing.
And this caused torque to generate the same <foreign-key> twice which 
caused problems.

My solution was simply to drop the foreign key. (This caused both keys 
to be dropped) and then just added
the foreign key once.

Jim wrote:
> Thomas,
>
> The standard process except we are still using Ant to
> generate the schema file using the ant command ant -f
> build-torque.xml jdbc.
> That's it. The file generated has the dup references.
> The source is mainframe DB2.
> We have not changed anything rcently except moving to
> the 3.2 rc2 version of Torque when it became
> available. But that is not the issue.
>
> I suspect something is different on the DB2 side but
> the dba's say no. And that's probably where the issue
> is and I'm hoping someone ran into the same issue and
> can give me a clue as to what I can look for to find
> the issue.
>
> Jim 
>
>
> --- Thomas Fischer <fi...@seitenbau.net> wrote:
>
>   
>> Could you please give a short description of what
>> you do ? I don't have a
>> clue.
>>
>>     Thomas
>>
>> Jim <sm...@yahoo.com> schrieb am 06.03.2008
>> 19:22:32:
>>
>>     
>>> Hi,
>>> I started running into a duplicate reference in
>>>       
>> the
>>     
>>> foreign-key issue several months ago in the ant
>>> generated schema.xml file.
>>> We are still using the 3.2 rc2 version of Torque
>>>       
>> and
>>     
>>> the tables are DB2.
>>>
>>> Here is an example of the dup reference..
>>> <foreign-key foreignTable="TABLE2">
>>>    <reference foreign="OFFRG_N" local="OFFRG_N"/>
>>>    <reference foreign="OFFRG_N" local="OFFRG_N"/>
>>> </foreign-key>
>>>
>>> Here is a portion the table that has the
>>>       
>> forigh-key..
>>     
>>> <table name="TABLE2">
>>>         <column name="OFFRG_N" primaryKey="true"
>>> required="true" size="12" type="CHAR"/>
>>>
>>> The dba's swear there have been no changes to the
>>>       
>> DB2
>>     
>>> tables.
>>>
>>> Thanks for any suggestions!
>>> Jim
>>>       
>>
>>     
> ---------------------------------------------------------------------
>   
>> To unsubscribe, e-mail:
>> torque-user-unsubscribe@db.apache.org
>> For additional commands, e-mail:
>> torque-user-help@db.apache.org
>>
>>
>>     
>
>
>
>       ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>   


RE: Duplicate references in the foreign-key

Posted by Jim <sm...@yahoo.com>.
Thanks Thomas,

It's odd but the following code is also being
generated with a default value that does not exist.
(CURRENT DATE). I'm guessing that has something to do
with the way the column is setup in DB2. 
Thanks!
Jim
        <column default="CURRENT DATE"
name="POL_EFF_D" required="true" type="DATE"/>
        <column default="CURRENT DATE"
name="POL_EXP_D" required="true" type="DATE"/>







--- Thomas Fischer <fi...@seitenbau.net> wrote:

> If Martin's advice does not work out, it could also
> be a different jdbc
> driver. Torque uses only information that the jdbc
> driver gives; it does
> not do any post-processing.
> 
>     Thomas
> 
> Jim <sm...@yahoo.com> schrieb am 13.03.2008
> 11:30:34:
> 
> > Thomas,
> >
> > The standard process except we are still using Ant
> to
> > generate the schema file using the ant command ant
> -f
> > build-torque.xml jdbc.
> > That's it. The file generated has the dup
> references.
> > The source is mainframe DB2.
> > We have not changed anything rcently except moving
> to
> > the 3.2 rc2 version of Torque when it became
> > available. But that is not the issue.
> >
> > I suspect something is different on the DB2 side
> but
> > the dba's say no. And that's probably where the
> issue
> > is and I'm hoping someone ran into the same issue
> and
> > can give me a clue as to what I can look for to
> find
> > the issue.
> >
> > Jim
> >
> >
> > --- Thomas Fischer <fi...@seitenbau.net> wrote:
> >
> > > Could you please give a short description of
> what
> > > you do ? I don't have a
> > > clue.
> > >
> > >     Thomas
> > >
> > > Jim <sm...@yahoo.com> schrieb am
> 06.03.2008
> > > 19:22:32:
> > >
> > > > Hi,
> > > > I started running into a duplicate reference
> in
> > > the
> > > > foreign-key issue several months ago in the
> ant
> > > > generated schema.xml file.
> > > > We are still using the 3.2 rc2 version of
> Torque
> > > and
> > > > the tables are DB2.
> > > >
> > > > Here is an example of the dup reference..
> > > > <foreign-key foreignTable="TABLE2">
> > > >    <reference foreign="OFFRG_N"
> local="OFFRG_N"/>
> > > >    <reference foreign="OFFRG_N"
> local="OFFRG_N"/>
> > > > </foreign-key>
> > > >
> > > > Here is a portion the table that has the
> > > forigh-key..
> > > > <table name="TABLE2">
> > > >         <column name="OFFRG_N"
> primaryKey="true"
> > > > required="true" size="12" type="CHAR"/>
> > > >
> > > > The dba's swear there have been no changes to
> the
> > > DB2
> > > > tables.
> > > >
> > > > Thanks for any suggestions!
> > > > Jim
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > torque-user-unsubscribe@db.apache.org
> > > For additional commands, e-mail:
> > > torque-user-help@db.apache.org
> > >
> > >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> 
> > Be a better friend, newshound, and
> > know-it-all with Yahoo! Mobile.  Try it now. 
> http://mobile.yahoo.com/;
> > _ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail:
> torque-user-help@db.apache.org
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> torque-user-help@db.apache.org
> 
> 



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: Duplicate references in the foreign-key

Posted by Thomas Fischer <fi...@seitenbau.net>.
If Martin's advice does not work out, it could also be a different jdbc
driver. Torque uses only information that the jdbc driver gives; it does
not do any post-processing.

    Thomas

Jim <sm...@yahoo.com> schrieb am 13.03.2008 11:30:34:

> Thomas,
>
> The standard process except we are still using Ant to
> generate the schema file using the ant command ant -f
> build-torque.xml jdbc.
> That's it. The file generated has the dup references.
> The source is mainframe DB2.
> We have not changed anything rcently except moving to
> the 3.2 rc2 version of Torque when it became
> available. But that is not the issue.
>
> I suspect something is different on the DB2 side but
> the dba's say no. And that's probably where the issue
> is and I'm hoping someone ran into the same issue and
> can give me a clue as to what I can look for to find
> the issue.
>
> Jim
>
>
> --- Thomas Fischer <fi...@seitenbau.net> wrote:
>
> > Could you please give a short description of what
> > you do ? I don't have a
> > clue.
> >
> >     Thomas
> >
> > Jim <sm...@yahoo.com> schrieb am 06.03.2008
> > 19:22:32:
> >
> > > Hi,
> > > I started running into a duplicate reference in
> > the
> > > foreign-key issue several months ago in the ant
> > > generated schema.xml file.
> > > We are still using the 3.2 rc2 version of Torque
> > and
> > > the tables are DB2.
> > >
> > > Here is an example of the dup reference..
> > > <foreign-key foreignTable="TABLE2">
> > >    <reference foreign="OFFRG_N" local="OFFRG_N"/>
> > >    <reference foreign="OFFRG_N" local="OFFRG_N"/>
> > > </foreign-key>
> > >
> > > Here is a portion the table that has the
> > forigh-key..
> > > <table name="TABLE2">
> > >         <column name="OFFRG_N" primaryKey="true"
> > > required="true" size="12" type="CHAR"/>
> > >
> > > The dba's swear there have been no changes to the
> > DB2
> > > tables.
> > >
> > > Thanks for any suggestions!
> > > Jim
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail:
> > torque-user-help@db.apache.org
> >
> >
>
>
>
>
>
____________________________________________________________________________________

> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;
> _ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: Duplicate references in the foreign-key

Posted by Jim <sm...@yahoo.com>.
Thomas,

The standard process except we are still using Ant to
generate the schema file using the ant command ant -f
build-torque.xml jdbc.
That's it. The file generated has the dup references.
The source is mainframe DB2.
We have not changed anything rcently except moving to
the 3.2 rc2 version of Torque when it became
available. But that is not the issue.

I suspect something is different on the DB2 side but
the dba's say no. And that's probably where the issue
is and I'm hoping someone ran into the same issue and
can give me a clue as to what I can look for to find
the issue.

Jim 


--- Thomas Fischer <fi...@seitenbau.net> wrote:

> Could you please give a short description of what
> you do ? I don't have a
> clue.
> 
>     Thomas
> 
> Jim <sm...@yahoo.com> schrieb am 06.03.2008
> 19:22:32:
> 
> > Hi,
> > I started running into a duplicate reference in
> the
> > foreign-key issue several months ago in the ant
> > generated schema.xml file.
> > We are still using the 3.2 rc2 version of Torque
> and
> > the tables are DB2.
> >
> > Here is an example of the dup reference..
> > <foreign-key foreignTable="TABLE2">
> >    <reference foreign="OFFRG_N" local="OFFRG_N"/>
> >    <reference foreign="OFFRG_N" local="OFFRG_N"/>
> > </foreign-key>
> >
> > Here is a portion the table that has the
> forigh-key..
> > <table name="TABLE2">
> >         <column name="OFFRG_N" primaryKey="true"
> > required="true" size="12" type="CHAR"/>
> >
> > The dba's swear there have been no changes to the
> DB2
> > tables.
> >
> > Thanks for any suggestions!
> > Jim
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> torque-user-help@db.apache.org
> 
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


RE: Duplicate references in the foreign-key

Posted by Thomas Fischer <fi...@seitenbau.net>.
Could you please give a short description of what you do ? I don't have a
clue.

    Thomas

Jim <sm...@yahoo.com> schrieb am 06.03.2008 19:22:32:

> Hi,
> I started running into a duplicate reference in the
> foreign-key issue several months ago in the ant
> generated schema.xml file.
> We are still using the 3.2 rc2 version of Torque and
> the tables are DB2.
>
> Here is an example of the dup reference..
> <foreign-key foreignTable="TABLE2">
>    <reference foreign="OFFRG_N" local="OFFRG_N"/>
>    <reference foreign="OFFRG_N" local="OFFRG_N"/>
> </foreign-key>
>
> Here is a portion the table that has the forigh-key..
> <table name="TABLE2">
>         <column name="OFFRG_N" primaryKey="true"
> required="true" size="12" type="CHAR"/>
>
> The dba's swear there have been no changes to the DB2
> tables.
>
> Thanks for any suggestions!
> Jim


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Duplicate references in the foreign-key

Posted by Jim <sm...@yahoo.com>.
Hi,
I started running into a duplicate reference in the
foreign-key issue several months ago in the ant
generated schema.xml file. 
We are still using the 3.2 rc2 version of Torque and
the tables are DB2.

Here is an example of the dup reference..
<foreign-key foreignTable="TABLE2">
   <reference foreign="OFFRG_N" local="OFFRG_N"/>
   <reference foreign="OFFRG_N" local="OFFRG_N"/>
</foreign-key>

Here is a portion the table that has the forigh-key..
<table name="TABLE2">
        <column name="OFFRG_N" primaryKey="true"
required="true" size="12" type="CHAR"/>

The dba's swear there have been no changes to the DB2
tables. 

Thanks for any suggestions!
Jim


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org