Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 56238 invoked from network); 4 Sep 2009 17:36:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Sep 2009 17:36:41 -0000 Received: (qmail 86841 invoked by uid 500); 4 Sep 2009 17:36:40 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 86809 invoked by uid 500); 4 Sep 2009 17:36:40 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 86798 invoked by uid 99); 4 Sep 2009 17:36:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2009 17:36:38 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.137.27.195] (HELO web112615.mail.gq1.yahoo.com) (98.137.27.195) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 04 Sep 2009 17:36:27 +0000 Received: (qmail 9882 invoked by uid 60001); 4 Sep 2009 17:36:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1252085762; bh=TMbHuI4FpJFDEB/mDKgLME+24H77q3qcxgnFzD2N++o=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=sPOK9VwdfjUsUgBkvDGPaPuIKQJnOqPCipJ/EhYIYXMkqtKJdzoZDfwXcHwghFFztu6xsjY1Uk5Hl5rtP3tE5MovYDVrQoO+oThAO8bPRi0WHV/4CQFjvA2uy5uUzZ0pUJGiDDPtvMvIVBgUdLIl7Nc+rAQNZQMDVTiMABfasMY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=KU1oADNnUCCS+g9rZJ9hj6p/B/DjHc1ar06QtLi9opCwPWqD0qxH7+oTF8S7GCLPMA6XdP1qdaQ73HvSKqysFXbu+jlUhnjJG7qQgJf2ykhUSoY0QrZZFMAAsuT1d5Lq2ZZa6/NEmhxu2EK/7aObYG5T//fIo8wYSKCFNkbN1YM=; Message-ID: <787284.9447.qm@web112615.mail.gq1.yahoo.com> X-YMail-OSG: s2SeAAQVM1k1gphD3ddjgUj0YH5BOVdvAOX3uMKEiZTyOZEQTJ601PxqdIJX0kGPRszB4E4sbOVorsCodiAF_s5Q8S9VpzxSsXrbYlsoPEoObfCHPHHB77LoatqqkRQKx8yeWtT3nHww0NRSQc167padxFMu0dVn6HrX.jbAr2asNd7akDeKrAA.KkYbnT1o8NNwYt2XfowdkIIPZDOj73ljsm8ZhCayKunVh_MSVUY0dGl87zgec.ObS5JkCUX1_ntLwgfnzch221qBV87qUQZdrDAvAGxX7fgCIeLaH1CEbDeo9bQnyosKMwNozIyZIlpATQ-- Received: from [99.128.202.180] by web112615.mail.gq1.yahoo.com via HTTP; Fri, 04 Sep 2009 10:36:02 PDT X-Mailer: YahooMailRC/1358.27 YahooMailWebService/0.7.338.2 References: <25283761.post@talk.nabble.com> Date: Fri, 4 Sep 2009 10:36:02 -0700 (PDT) From: Adam Allgaier Subject: Re: Primary key is set to the foreign key value To: Apache Torque Users List In-Reply-To: <25283761.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked by ClamAV on apache.org Change the table definition to this: You are generating the PK value yourself, so you don't need Torque or Postgres to do it for you. Adam ----- Original Message ---- From: levko To: torque-user@db.apache.org Sent: Thursday, September 3, 2009 3:43:33 PM Subject: Primary key is set to the foreign key value 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. The 'Person_SSN' table has its own PK 'ssn':
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. Could you, please, help me to understand what's the problem here? I've uploaded the source files. The test driver is in the lk.test.TestOM class. Thanks in advance for any idea, -- Lev http://www.nabble.com/file/p25283761/Test.zip Test.zip -- View this message in context: http://www.nabble.com/Primary-key-is-set-to-the-foreign-key-value-tp25283761p25283761.html Sent from the Apache DB - Torque Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org