From torque-dev-return-4150-apmail-db-torque-dev-archive=db.apache.org@db.apache.org Thu May 06 18:05:54 2004 Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 94331 invoked from network); 6 May 2004 18:05:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 May 2004 18:05:54 -0000 Received: (qmail 37877 invoked by uid 500); 6 May 2004 18:05:42 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 37841 invoked by uid 500); 6 May 2004 18:05:42 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 37750 invoked from network); 6 May 2004 18:05:41 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 6 May 2004 18:05:41 -0000 Received: (qmail 93972 invoked from network); 6 May 2004 18:05:47 -0000 Received: from localhost.hyperreal.org (HELO minotaur.apache.org) (127.0.0.1) by localhost.hyperreal.org with SMTP; 6 May 2004 18:05:47 -0000 Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: torque-dev@db.apache.org To: torque-dev@db.apache.org Subject: =?iso-8859-1?q?=5BDB_Torque_Wiki=5D_Updated=3A__FrequentlyAskedQuestions?= Date: Thu, 06 May 2004 18:05:47 -0000 Message-ID: <20040506180547.93861.64163@minotaur.apache.org> X-Spam-Rating: localhost.hyperreal.org 1.6.2 0/1000/N 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 Date: 2004-05-06T11:05:47 Editor: 213.78.116.250 <> Wiki: DB Torque Wiki Page: FrequentlyAskedQuestions URL: http://wiki.apache.org/db-torque/FrequentlyAskedQuestions no comment Change Log: ---------------------------------------------------------------------------= --- @@ -184,11 +184,11 @@ '''Answer:''' Quick way -> No. And we hope that in the next release there = will be a way for plugging external Name Genrator. But for now you can stil= l change the genrator to fit your needs. For example I have extended JavaNa= meGenerator this way: = 1) added a single line to interface org.apache.torque.engine.database.mode= l.NameGenerator; - - String CONV_METHOD_UNDERSCORE_IGNORE_DOTS =3D "underscore_ignore_dots"; - +{{{ +String CONV_METHOD_UNDERSCORE_IGNORE_DOTS =3D "underscore_ignore_dots"; +}}} 2) added a single conversion method to class org.apache.torque.engine.data= base.model.JavaNameGenerator; - +{{{ protected String underscoreIgnoreDotsMethod(String schemaName) { schemaName =3D schemaName.replaceAll("\\.", "_"); = @@ -201,11 +201,13 @@ } return name.toString(); } -3) added a single condition to class org.apache.torque.engine.database.mod= el.JavaNameGenerator; method: String generateName(List inputs); - +}}} +3) added a single condition to class org.apache.torque.engine.database.mod= el.JavaNameGenerator; method: String generateName(List inputs); + = +{{{ } else if (CONV_METHOD_UNDERSCORE_IGNORE_DOTS.equals(method)) { javaName =3D underscoreIgnoreDotsMethod(schemaName); - +}}} 4) rebuilt the torque-generator maven plugin (src/generator$ maven jar:ins= tall) = 5) now I can use the attribute value in the database tags of my schemas @@ -296,7 +298,7 @@ = -- Tarlika Elisabeth Schmitz = -=3D=3D Why does Torque generate invalid SQL for PostgeSQL BOOL columns? = =3D=3D +=3D=3D Why does Torque generate invalid SQL for PostgreSQL BOOL columns? = =3D=3D = Torque generates invalid SQL for bool comparisons: generated "WHERE xyz=3D0", but it should be ''WHERE xyz=3DFALSE'' or "WHER= E xyz=3D'0'".=20 --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org