Title: Field Names with underscore

I too was having the same issue.  It seems you must rename the database columns to COD_GEN_PAIS for example.  Otherwise, how will you tell the code/tool where to put the separation for each column?  The tool will not know where you may feel it appropriate to put underscores... 

 

Another alternative is to write your own custom xslt stylesheet to transform the xml output you are currently receiving from the JDO doclet into a properly dashed one.  What seems to be for sure is that the XXX in the getXXX() and setXXX() java methods must be identical to the column names in your JDO tables.  For example, setCOD_GEN_PAIS corresponds to a column named COD_GEN_PAIS not CODGENPAIS ( that would be setCODGENPAIS() ).  Not 100% sure, but I don’t think you can change that factor in Castor JDO currently.

 

brandon

-----Original Message-----
From: Esteban Garcia [mailto:[EMAIL PROTECTED]]
Sent:
Tuesday, February 18, 2003 1:23 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Field Names with underscore

 

Hi guys,

We are using JDO doclet to automatically generate  tables DDL (creates and drop statements). We were able to make it run but we have the following issues we don't know how to implement.

1.- Field Names with underscore.
We are using Oracle Db as persistence target. As you might know, Oracle uses field names in capital letters. This making our Hungarian notation for field name looks really bad. i.e.: codGenPais looks like CODGENPAIS. Can we configure JDO to generate field names with _ separator, i.e. COD_GEN_PAIS? we noticed that xml files are generated with '-', i.e. cod-gen-pais.

Ing. Esteban J. Garcia
Buenos Aires - Argentina

 

Reply via email to