db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <tfisc...@apache.org>
Subject Re: Datatype mapping in Torque 3.2
Date Sat, 15 Jul 2006 06:55:44 GMT

this should be a way that works

- extend the platform class you want to change, and end the classname with 
Impl. Put the resulting class in the same 
(org.apache.torque.engine.platform.Platform) package.

- set the torque.database property in the project.properties (NOT in the 
Torque.properties in the runtime, this should stay as it is) to the 
Classname without the "Impl" in the end (you may start lowercase)

For example: classname is 
torque.database = myOracle

Please tell us whether that works.


for reference: Code of the PlatformFactory class:

     private static String getClassnameFor(String platform)
         String pf = "Default";
         if (platform != null)
             pf = platform;
         return "org.apache.torque.engine.platform.Platform" + 
pf.substring(0, 1).toUpperCase() + pf.substring(1) + "Impl";

On Thu, 13 Jul 2006, Tobias Hilka wrote:

> Hello everyone,
> I just changed my torque version from 3.1.1 to 3.2.
> I made some changes to the standard mapping (VARCHAR = NVARCHAR2 ...) in
> Torque 3.1.1 using the db.props file. But now this mapping moved to the
> Platform classes. Is there any way to change the mapping in an easy way,
> without changing the classes and recompiling the templates jar?
> Best Regards,
> Tobias

To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message