Re: Primary key is set to the foreign key value

Thomas Vandahl <[email protected]> Fri, 04 Sep 2009 21:02:20 +0200
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
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.