db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: Primary key is set to the foreign key value
Date Fri, 04 Sep 2009 19:02:20 GMT
Adam Allgaier wrote:
> Change the table definition to this:
>   <table name="Person_SSN" description="Person SSN" idMethod="none">
> You are generating the PK value yourself, so you don't need Torque or Postgres to do
it for you.

Right. The Torque idbroker is made for numerical primary keys. Your
primary key is CHAR. Are you sure you want to do this?

>   <table name="Person_SSN" description="Person SSN">
>     <column name="SSN"
>       required="true"
>       primaryKey="true" 
>       type="CHAR" size="9"
>       description="SSN"/>

Bye, Thomas.

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

View raw message