You're probably right. But I was just fooling around with Torque to
familiarize myself with it.

The thing is, I anticipate some difficulty mapping my inheritance hierachies
to Torque. Say that a particular column in table Foo can actually contain
the primary key of one of two (or more) tables. How would one represent this
in the Torque schema?

Anyhow, if the feature of having multiple foreign keys is not supported, the
OM generator/parser should probably complain at the build stage.

----- Original Message -----
From: Stanley Smith <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 17, 2001 9:00 PM
Subject: RE: [torque] Bug in OM Generation


> From a logical view point, these foreign key references don't make logical
> sense.  You have a column on one table that has RI to two different
columns
> on another table.  This would mean that the values in those two different
> columns must be equal.  Why would anyone implement a database table that
has
> two columns that always would be the same?  Won't just one coulmn be
enough?
>   Maybe I am missing something.
>
> While this is not always true, most of the time your foriegn key
references
> refer to the parent table's primary key.
>
> I think that your data model needs a bit of review.
>
>
> ----- Original Message -----
> From: "Kelvin Tan" <[EMAIL PROTECTED]>
> To: "Turbine Users List" <[EMAIL PROTECTED]>
> Sent: Saturday, November 17, 2001 6:33 AM
> 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]>
> >
> >
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> --
> 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