Forgot to add that this was found using the current CVS build of Torque.

----- Original Message -----
From: Kelvin Tan <[EMAIL PROTECTED]>
To: Turbine Users List <[EMAIL PROTECTED]>
Sent: Saturday, November 17, 2001 8:33 PM
Subject: [torque] Bug in OM Generation


> Think I've found one...
>
> In the schema file, I'm mapping one local reference key as a foreign key
> twice (I don't even know if I'm supposed to. I'm just trying it out)
>
> <column name="foo" ...>
>
> <foreign-key foreignTable="barTable">
>   <reference local="foo" foreign="bar">
> </foreign-key>
> <foreign-key foreignTable="barTable">
>   <reference local="foo" foreign="bar2">
> </foreign-key>
>
> Running ant builds fine. SQL is generated and OM is generated. However
when
> I attempt to compile, the compiler complains. Specifically, with only
> foreign-key of bar, and only foreign-key of bar2, everything is ok. But
when
> I add both bar and bar2 as foreign keys, the BaseBar2 object doesn't
> compile.
>
> Examining the code, the problem <b>seems</b> to be in the setId(StringKey
v)
> method, a snippet from the actual code:
>
>               // update associated AclEntry
>               if (collAclEntrys != null )
>               {
>                   for (int i=0; i<collAclEntrys.size(); i++)
>                   {
>                       ((AclEntry)collAclEntrys.get(i))
>                           .set${colFK.JavaName}(v);
>                   }
>               }
>
> The offender is where Velocity was supposed to fill in the value for
> $colFK.JavaName but didn't.
>
> I'd write a test-case, but the darned test-cases don't even pass when
> everything is working (Win9x)...Will help with anything else though.
>
> Regards,
> Kelvin
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to