Return-Path: Mailing-List: contact turbine-torque-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list turbine-torque-dev@jakarta.apache.org Received: (qmail 18480 invoked by uid 98); 14 Jan 2003 13:27:48 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 18285 invoked from network); 14 Jan 2003 13:27:44 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 14 Jan 2003 13:27:44 -0000 Received: (qmail 71295 invoked by uid 500); 14 Jan 2003 13:26:24 -0000 Received: (qmail 71285 invoked from network); 14 Jan 2003 13:26:24 -0000 Received: from unknown (HELO egssrv01.egsgroup.com) (217.169.1.234) by daedalus.apache.org with SMTP; 14 Jan 2003 13:26:24 -0000 Received: from egsgroup.com ([10.20.0.2]) by egssrv01.egsgroup.com with Microsoft SMTPSVC(5.0.2195.3779); Tue, 14 Jan 2003 13:23:29 +0000 Date: Tue, 14 Jan 2003 13:26:24 +0000 Subject: Re: how to map Peer.field-name --> BO-member Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) From: Gareth Boden To: "Turbine Torque Developers List" Content-Transfer-Encoding: 7bit In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.551) X-OriginalArrivalTime: 14 Jan 2003 13:23:29.0171 (UTC) FILETIME=[2071B630:01C2BBD0] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I don't think it's possible. The Peer fields are the database column names, and the BO methods might have different names, and there doesn't seem to be a map of this information available at runtime. G. On Tuesday, January 14, 2003, at 01:20 pm, Marc Lustig wrote: > Hi, > I'm simply trying to get a field from a torque-object by field-name. > How is this done? > > More specifically, how do I actually map between the member of the BO > and > the name of the field? > > An example: > ProductPeer has: public static final String ORT; // the field name > Product has member: private byte ort=0; > > What I need is a method in Product that looks like this: > Object getMemberByFieldName(String fieldname); // fieldname should > refer to > ProductPeer > > in my case: getMemberByFieldName("ORT") should return product.ort; > > Can somebody please advise me about a solution that is available? > > Remark: BaseObject.getByName(java.lang.String field) does not contain > any > generic functionality at all. > > Thanks in advance. > Marc > > -- > To unsubscribe, e-mail: > > For additional commands, e-mail: > >