Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 10440 invoked from network); 17 Feb 2006 07:48:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Feb 2006 07:48:45 -0000 Received: (qmail 55561 invoked by uid 500); 17 Feb 2006 07:48:44 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 55539 invoked by uid 500); 17 Feb 2006 07:48:43 -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 55528 invoked by uid 99); 17 Feb 2006 07:48:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2006 23:48:43 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of Patrick-Herrmann@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 16 Feb 2006 23:48:42 -0800 Received: (qmail invoked by alias); 17 Feb 2006 07:48:21 -0000 Received: from p508A2266.dip0.t-ipconnect.de (EHLO [80.138.34.102]) [80.138.34.102] by mail.gmx.net (mp024) with SMTP; 17 Feb 2006 08:48:21 +0100 X-Authenticated: #4332580 Message-ID: <43F57FC9.3030904@gmx.de> Date: Fri, 17 Feb 2006 08:48:25 +0100 From: Patrick Herrmann User-Agent: Thunderbird 1.5 (Windows/20051107) MIME-Version: 1.0 To: torque-user@db.apache.org Subject: Torque and zero pks Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I tried torque and run into problem with references. Look at this shema:
The primary keys can be 0. When I store two objects like this: Class1 c1 = new Class1(); c1.setPk(0); c1.save(); Class2 c2 = new Class2(); c2.setPk(0); c2.setClass1(c1); c2.save(); And then do the this query later: Class2 c2 = Class2Peer.retrieveByPK(0); Class1 c1 = c2.getClass2(); <--- null , then c1 is null. When Class1 primary key is non 0 then it works fine. Do I really need to use another primary key with, for example, auto increment to avoid this problem? Class1.retrieveByPK(0) works fine, why not c2.getClass2()? Thanks, Patrick --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org