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 96176 invoked from network); 15 Apr 2003 11:31:42 -0000 Received: from mail.gmx.net (213.165.65.60) by daedalus.apache.org with SMTP; 15 Apr 2003 11:31:42 -0000 Received: (qmail 11977 invoked by uid 65534); 15 Apr 2003 11:31:41 -0000 Received: from pD9E6C2C3.dip0.t-ipconnect.de (EHLO yomama) (217.230.194.195) by mail.gmx.net (mp007-rz3) with SMTP; 15 Apr 2003 13:31:41 +0200 Message-ID: <001d01c3034b$69059570$c3c2e6d9@yomama> From: "Michael Schmitt" To: References: <000d01c30346$bbb54900$c3c2e6d9@yomama> Subject: Re: foreign-key: how to reference two fields? Date: Tue, 15 Apr 2003 13:34:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Sorry, I just discovered that I forgot to declare both fields as primary keys. No, it works. bye, michael ----- Original Message ----- From: "Michael Schmitt" To: Sent: Tuesday, April 15, 2003 1:01 PM Subject: foreign-key: how to reference two fields? > Hi, > I am wondering how to manage something like the following: > I have got a table with some foreign key, but the key consists of two > values. > My table looks something like this: > > > > > size="255"/> > > > > >
> > To get a unique city, you need the city's name and its country. > I am able to generate sourcecode, but I am unable to compile it. > Torque generates something like the following in BaseBand.java: > public City getCity() throws TorqueException{ > ... > aCity = CityPeer.retrieveByPK(this.origin_city, this.origin_country); > ... > } > > But there is no generated method 'retrieveByPK(String, String)' in > BaseCityPeer. > Do I have to write it on my own, and if so, how? > > bye, > michael > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org >