db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Campbell, Justin" <jcampb...@profilesys.com>
Subject RE: how to set the PK manually?
Date Mon, 10 Feb 2003 22:54:05 GMT
Marc - 

I believe your problem is a conceptual one. If the value in table B must
equal the value in table A to show they are related, the index/key in table
B is a *foreign key* -- not a primary key.

Let me know if this the actual situation. If not, a better explanation of
your situation may be in order :)

Justin Campbell
Project Technical Lead
Profile Systems, Inc.

-----Original Message-----
From: Marc Lustig [mailto:mail@marclustig.com]
Sent: Thursday, February 06, 2003 1:21 PM
To: Torque Users List
Subject: how to set the PK manually?


I'm creating a new instance (row) and set the PK to a certain value.
(I need to do this because this table B extends another table A, so the PK
in table B must be the same as in table A.)

My defaultIdMethod is "idbroker":
<database defaultIdMethod="idbroker"...

And to make torque not generating the PK I set idMethod="none":
<table name="B" idMethod="none">

Problem is when I trigger save() torque still generates a new PK and assigns
it. How comes that?
How can I make torque not to auto-generate a new primary key when save() is



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

View raw message