Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 29087 invoked from network); 21 Jun 2005 07:23:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2005 07:23:07 -0000 Received: (qmail 34725 invoked by uid 500); 21 Jun 2005 07:23:06 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 34703 invoked by uid 500); 21 Jun 2005 07:23:06 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 34682 invoked by uid 99); 21 Jun 2005 07:23:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2005 00:23:05 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.175.229.106] (HELO mail.seitenbau.net) (194.175.229.106) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2005 00:23:07 -0700 Received: from [195.127.188.18] (helo=www.seitenbau.net) by router1.seitenbau.net with esmtp (Exim 4.43) id 1Dkd66-0003o1-3e for torque-dev@db.apache.org; Tue, 21 Jun 2005 09:23:02 +0200 In-Reply-To: <42B72ACE.4090909@reeltwo.com> Subject: Re: Inheritence question To: "Apache Torque Developers List" X-Mailer: Lotus Notes Release 6.0 September 26, 2002 Message-ID: From: Thomas Fischer Date: Tue, 21 Jun 2005 09:23:00 +0200 X-MIMETrack: Serialize by Router on www/seitenbau(Release 6.5.1|January 21, 2004) at 21.06.2005 09:23:01 AM MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I am happy to hear this. Of course we are interested in these patches. I would guess that the "protected" part of the patch is not problematic to implement, and also the foreign key part should be ok. In my opinion, it is a good idea to put the base packages into a subdirectory. However, I am not so sure about backwards compatibility there. Probably one would want to make this configurable (preferably via a configurable package suffix) I do not know how many files you have patched and against which version. If there are not too many changed files, I would appreciate it if you create an issue in scarab and append the complete files there (please do not diff if possible, some velocity templates have changed a bit in the meantime in cvs). If you prefer it, you can also mail the files directly to me. Thomas Jonathan Purvis schrieb am 20.06.2005 22:45:02: > Thomas Fischer wrote: > > I am afraid there is nothing to achieve this out of the box. There is no > > way Torque can know which column belongs to which class from the > > schema.xml (and I do not know a way how this could be specified). > > Of course you can subclass the setters of the unwanted column and throw an > > exception, making sure that they can never be called. But this is not the > > optimal solution, it would be better if they would not be visible. > > One way to achieve this might be to change the templates such that for > > inheritance base classes, the getters and setters are made protected and > > you make just the wanted columns public in the subclass. > > As luck would have it, we have patched Torque to do this. We added a > "protected" attribute to the column element, so that when > protected="true" is defined, the getter and setter for the column is > protected and can be defined only in the subclass that needs it. > > We have also patched Torque to put the base classes in a separate > package (to ease not checking them into a version control system and not > subjecting them to style checks) and allow null foreign keys by > supporting "int" in one table and "Integer" in another. > > Are you interested in adding these patches to Torque? > > > Regards, > > Jon > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org > For additional commands, e-mail: torque-dev-help@db.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org