Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 17710 invoked from network); 26 Feb 2004 16:28:01 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Feb 2004 16:28:01 -0000 Received: (qmail 16747 invoked by uid 500); 26 Feb 2004 16:27:42 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 16692 invoked by uid 500); 26 Feb 2004 16:27:42 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 16622 invoked from network); 26 Feb 2004 16:27:41 -0000 Received: from unknown (HELO ProcessSystemsServer) (65.36.40.98) by daedalus.apache.org with SMTP; 26 Feb 2004 16:27:41 -0000 Received: from [10.0.1.21] by ProcessSystemsServer (ArGoSoft Mail Server Plus, Version 1.6 (1.6.0.0)); Thu, 26 Feb 2004 11:40:32 -0500 From: "Brent Atkins" To: "Apache Torque Users List" Subject: RE: Another Question / Feature Request Date: Thu, 26 Feb 2004 11:22:32 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <403D2478.6040707@cox.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Trever, as far as I know this cannot be currently done. You do have an interesting point here though, that segues nicely into my own feature request :-) I finally got most of my Struts code to be automatically generated (I'll be submitting a Wiki entry when I finish it completely) and I've run into the same sort of problem. I've got a number of columns that I need to validate, like phone numbers and zip codes and states, etc. Now I'm not trying to get Torque's runtime to handle it like Trever is, (using Struts it would violate MVC - business logic shouldn't be in the persistence tier) but I do want to pass my Struts code generator a few extra properties that currently aren't being held by Table or Column. Right now I accomplish it with a pretty nasty hack (a bunch of if statements) that couples my code in more places than I would like. Since Torque seems to store all of it's data as attributes in the schema (if I'm wrong, let me know) is seems that the space between and is being unused. Perhaps Torque would be better equipped to handle custom needs if it allowed a person to insert key-value pairs into the schema that could be accessed during generation. So instead of being limited to this...
You could add descriptors that help your own code generation... type=phone areaCode=required howIsThisExample=reallyStupid
It's a poor example (sadly, I couldn't think of a better one) but hopefully those of you who currently generate other code with Torque can see the benefit to this extensibility. Currently I have to change every template that has to process a phone number whenever I add a different phone field (ie. mobile, business, fax) where with this change I could just label each one in my schema as a type=phone and not have to change a single template (provided I wrote it well the first time). Just a thought... And to the guy who thinks that Torque is too hard to use - it's worth it. I now generate 95% of my site from the schema using the Torque generators and my own templates. If I could figure out a way to get it to generate images I'd be at 100% :-) Don't let the high learning curve get to you, it is incredibly powerful once you figure it out. But yeah, the docs could be better...oh well. -----Original Message----- From: Trever Shick [mailto:trevorshick@cox.net] Sent: Wednesday, February 25, 2004 5:41 PM To: torque-user@db.apache.org Subject: Another Question / Feature Request I have a class called Phone that parses and formats phone numbers. I'd like to be able to specify: or even: Is there a way to do this with the current version? Is this something that will be added with the "domains" ? -- Trever M. Shick Sequoyah Technologies 2448 East 81st Street, Suite 2500 Tulsa, OK 74137 tshick@seqtek.com CONFIDENTIALITY NOTE: The information contained in this document and accompanying documents is legally privileged and confidential information intended only for the use of the individual or entity named herein. If the reader of this transmittal is not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copy of this information is strictly prohibited. If you have received this transmittal and accompanying information in error, please immediately notify us by telephone and return the original document and accompanying information to us at the address above and destroy any copies received. Thank You! --------------------------------------------------------------------- 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