db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject RE: Primary key is set to the foreign key value
Date Fri, 04 Sep 2009 07:53:24 GMT
> I have very simple DB schema, where the 1st table (Person) has PK 'id'
and
> the 2nd table (Person_SSN) has FK 'person_id' referring to the 'id' field
of
> the 'Person' table.
>
> ......
>
> When I create 'PersonSsn' object, I set SSN to '123456789', but the DB
> record shows that  SSN value is the same as the PERSON_ID value. I use
> Torque 3.3 and PostgreSQL 8.4.0.

I have never heard of such behaviour before nor have I experienced it
myself.

Do you have the opportunity to debug the application ? If yes, you can set
a debug breakpoint in the setter of the PERSON_ID value in BasePersonSsn to
find out where the value comes from.
If this method is not called, set a breakpoint in the save method and see
whether the PERSON_ID is already set at the start of the method and whether
it is set in the method.

   Hope that helps,

           Thomas


---------------------------------------------------------------------
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