db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anas Mughal" <anasmug...@gmail.com>
Subject Change JDBC to Java map
Date Wed, 24 Oct 2007 15:19:09 GMT
We have specified NUMERIC(9) as the JDBC type for our primary keys.
(Database is Oracle.)

The generated Java code produces BigDecimal for the NUMERIC types. I am
wondering if there is a way to change the generator to produce "long"
instead of BigDecimal.

I have done this type of changes when I used Propel. (Propel is the PHP port
of Torque.) It was pretty simple changing type maps in Propel.

In TypeMap.java, I see the following maps:

   - jdbcToJavaObjectMap
   - jdbcToJavaNativeMap
   - jdbcToVillageMethodMap
   - jdbcToPPMethodMap
   - jdbcToTorqueTypeMap

I am unsure which of the above I should change. Could someone please guide
me on what is the right way to enforce "long" on the java-side for NUMERIC.
Would it be advised not to change the existing Torque behavior?

Thank you very much.
-- 
Anas Mughal

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message