Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 16354 invoked from network); 27 Feb 2003 21:31:31 -0000 Received: from itumx1.det.nsw.edu.au (HELO itumx1.dmzs.det.nsw.edu.au) (153.107.41.16) by daedalus.apache.org with SMTP; 27 Feb 2003 21:31:31 -0000 Received: from itfsmtp2.central.det.win (itfsmtp2.det.nsw.edu.au [153.107.8.32]) by itumx1.dmzs.det.nsw.edu.au (8.12.6/8.12.6) with ESMTP id h1RLVFYk261226 for ; Fri, 28 Feb 2003 08:31:15 +1100 (EST) Received: from itfexch18.central.det.win (Not Verified[153.107.9.28]) by itfsmtp2.central.det.win with MailMarshal (v5,0,3,78) id ; Fri, 28 Feb 2003 08:31:15 +1100 Received: by itfexch18.central.det.win with Internet Mail Service (5.5.2653.19) id ; Fri, 28 Feb 2003 08:31:15 +1100 Message-ID: From: "Trudgett, Glen" To: "'Turbine Torque Users List'" Subject: RE: obtaining native primary keys problem Date: Fri, 28 Feb 2003 08:31:09 +1100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N When I make the insert into a particular table (2 Columns [packey, filename]) This is the specific call; pac.insert("/home/file.dat"); The function call is like this; public void insert(String filename) { Pac insert = new Pac(); try { insert.setFilename(filename); insert.save(); } catch (Exception e) { e.printStackTrace(); } return; } The packey is automagically created using torques "native" primary key selection. Glen -----Original Message----- From: Richard Grossman [mailto:richard@goldmail.net.il] Sent: Thursday, 27 February 2003 7:05 PM To: Turbine Torque Users List Subject: Re: obtaining native primary keys problem How do you made the insert ?? How this key is generated do you use sequence object ? Richard ----- Original Message ----- From: "Trudgett, Glen" To: "'Turbine Torque Users List'" Sent: Thursday, February 27, 2003 02:24 Subject: RE: obtaining native primary keys problem > To All, > > > I currently have an Oracle DB that I am using for my data. > > I have set my tables to have natively generated primary keys, which > works fine. > > I do an insert of information into a table, and the table happily > accepts the data, as expected. > > test.insert("blah"); > > Table > 1, blah > > When I try to obtain the primary key for this new entry, which I want > to use > to populate a foreign key link table, using > > Test.getPrimaryKey(); > > I receive a value of 0. (Not the value of 1 or whatever number it is > allocated!!) > > I can not work out why I can not get these values. I have tried a > number of > ways e.g. getbyname(), getPrimaryKey(). > > Also I have noticed that the getPrimaryKeyas* functions are not > available. > > Has anybody run into a similar scenario? > > TIA > > > > Glen Trudgett > Unix system administration > Information Technology Bureau > Department of Education and Training > Level 2, 39A Herbert St, St Leonards, NSW 2065 Australia > Tel: 61+ (2) 99429970 Fax: 61+ (2) 99429600 > > ********************************************************************** > This message is intended for the addressee named and may contain > privileged information or confidential information or both. If you are > not the intended recipient please delete it and notify the sender. > ********************************************************************** > > ********************************************************************** > This message is intended for the addressee named and may contain > privileged information or confidential information or both. If you are > not the intended recipient please delete it and notify the sender. > ********************************************************************** > > --------------------------------------------------------------------- > 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 ********************************************************************** This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender. **********************************************************************