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 Fran Ferri <fr...@gmail.com> on 2008/02/19 21:16:23 UTC

Fwd: Columnmap only support one foreingkey

In my aplication i need a column object working, im using torque, and his
generated clases.

i think that a simple manual to configure and use multiple databases is very
interesting.

Why the columnmap only supports one related column?
Is an update pending?

an example or style manual to implement torque must be usefull for begginers
as me.

sorry my english

RE: Fwd: Columnmap only support one foreingkey

Posted by Thomas Fischer <fi...@seitenbau.net>.
"Greg Monroe" <Gr...@DukeCE.com> schrieb am 19.02.2008 23:07:13:

> Thomas Fischer said:
>
> > On Tue, 19 Feb 2008, Fran Ferri wrote:
> > >
> > > Why the columnmap only supports one related column?
> > > Is an update pending?
> >
> > It seems that this particular information in ColumnMap does not
> > support multiple foreign key relations per column.
> > ...
> >
>
> I'm not even sure why this is needed?  AFAIK, the SQL standards
> specifies:
>
> The foreign key identifies a column or a set of columns in one
> (referencing)
> table that refers to a column or set of columns in another (referenced)
> table.
> The columns in the referencing table must be the primary key or other
> candidate key in the referenced table. The values in one row of the
> referencing columns must occur in a single row in the referenced table.
>
> I'd interpret this as each column can only have one matching column in a
> single remote table.  If you want the "ordering" for the remote tables'
> primary key set, you can get that by looking at the remote table's
> information.
>
> But I could be wrong about in this.  I'd be curious to see the SQL that
> would define the multiple foreign key on one column.  And then to see
> how many of the common Database servers support it.

I'm quite sure one can have multiple Foreign keys per column. Look at the
"C" table in the test project. (not exactly what you wanted, but one column
occurs is a single FK and is part of a composite FK as well)

    Thomas


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


RE: Fwd: Columnmap only support one foreingkey

Posted by Greg Monroe <Gr...@DukeCE.com>.

Thomas Fischer said:
> 
> On Tue, 19 Feb 2008, Fran Ferri wrote:
> >
> > Why the columnmap only supports one related column?
> > Is an update pending?
> 
> It seems that this particular information in ColumnMap does not
support
> multiple foreign key relations per column. But as this information is
> not
> used anyway, this has not been much of a problem in the past. There
are
> currently no plans to change this behaviour.
> 

I'm not even sure why this is needed?  AFAIK, the SQL standards
specifies:

The foreign key identifies a column or a set of columns in one
(referencing) 
table that refers to a column or set of columns in another (referenced)
table. 
The columns in the referencing table must be the primary key or other 
candidate key in the referenced table. The values in one row of the 
referencing columns must occur in a single row in the referenced table.

I'd interpret this as each column can only have one matching column in a

single remote table.  If you want the "ordering" for the remote tables' 
primary key set, you can get that by looking at the remote table's 
information.

But I could be wrong about in this.  I'd be curious to see the SQL that
would define the multiple foreign key on one column.  And then to see 
how many of the common Database servers support it.
DukeCE Privacy Statement:
Please be advised that this e-mail and any files transmitted with
it are confidential communication or may otherwise be privileged or
confidential and are intended solely for the individual or entity
to whom they are addressed. If you are not the intended recipient
you may not rely on the contents of this email or any attachments,
and we ask that you please not read, copy or retransmit this
communication, but reply to the sender and destroy the email, its
contents, and all copies thereof immediately. Any unauthorized
dissemination, distribution or copying of this communication is
strictly prohibited.

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


Re: Fwd: Columnmap only support one foreingkey

Posted by Thomas Fischer <tf...@apache.org>.
On Tue, 19 Feb 2008, Fran Ferri wrote:
> i think that a simple manual to configure and use multiple databases is very
> interesting.

Yes, but we do not have enough manpower to write and maintain one.

>
> Why the columnmap only supports one related column?
> Is an update pending?

It seems that this particular information in ColumnMap does not support 
multiple foreign key relations per column. But as this information is not 
used anyway, this has not been much of a problem in the past. There are 
currently no plans to change this behaviour.

> an example or style manual to implement torque must be usefull for begginers
> as me.

There is the Tutorial, the runtime and generator references and of course 
the source code.

    Thomas

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