db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: Problems with 2 columns primary key and autoincrement
Date Mon, 19 Jan 2004 00:47:23 GMT
Glossing over the potential problem in torque (I think this has been 
covered before - check the mailing list archives) why do you need ID to 
be part of the primary key since ID_ATTIVITA fits the definition of a 
primary key - i.e. it uniquely identifies the rows.  Your ID column is a 
simple foreign key.

Scott
__

Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au


Giulio Vezzelli wrote:

>Greetings,
> 
>    I think I found some kind of odd behaviour in Torque, regarding this
>particular case:
> 
>My table ATTIVITA is structured this way :
> 
>    ID                    primary key (refers to a foreign table),
>required
>    ID_ATTIVITA     primary key, autoincrement, required
>    other columns
> 
> 
>With both "native" and "IDBroker" id methods, Torque fails to save()
>this object, because the autoincrement field is "null".
> 
>If the primary key is one column only (the autoincrement one), the save
>goes fine.
> 
> 
>I think Torque has some problem handling multicolumn primary keys w/
>autoincrement fields...
> 
>Anyone had some experience in similar cases ?
> 
> 
>Giulio Vezzelli
>Infolog S.r.l.
>Via Alfieri, 28
>Modena - 41100
>Telefono : +39-059-822446
>Sito web : http://www.infolog.it <http://www.infolog.it/> 
>E-mail : giulio.vezzelli@infolog.it
> 
> 
>
>  
>


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


Mime
View raw message