db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Tilsted <til...@daimi.au.dk>
Subject Re: Duplicate references in the foreign-key
Date Thu, 13 Mar 2008 10:44:15 GMT
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 <fischer@seitenbau.net> wrote:
>
>   
>> Could you please give a short description of what
>> you do ? I don't have a
>> clue.
>>
>>     Thomas
>>
>> Jim <smoothie_jc@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
>   


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message