db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: Datatype mapping in Torque 3.2
Date Tue, 18 Jul 2006 14:02:04 GMT
AFAIK, you have two choices. You can modify the control.vm 
template files in all the sql directories to map your 
extended class name to the original DB type. Or you can 
copy the original DB type directories to your new type.

IMHO, the second is the better option.

That said, a nice enhancement might be to extend the 
Platform Interface with a getPlatformTemplateDirectory() 
method.  Then modify the Templates to use this instead 
of Class name.  This would allow for DB Adaptor extensions 
without needing template jar changes.

As always, contribution are welcome.

> -----Original Message-----
> From: Tobias Hilka [mailto:thilka@vps.de] 
> Sent: Tuesday, July 18, 2006 8:41 AM
> To: Apache Torque Developers List
> Subject: AW: Datatype mapping in Torque 3.2
> 
> Hello,
> 
> I tried to follow your suggestions. But I still have some 
> problems with creating my own database settings.
> 
> I extended the platform class, changed the torque.database 
> property in my build.properties (using ant). Now I put the 
> new class in the same .jar as the other platform classes. The 
> class is found by ant loader. So far so good.
> 
> The problem is, now I obviously need a completely new 
> directory structure in the torque templates for my new 
> Database class. (sql/base/mynewmssql/..., id-table.mynewmssql 
> an so on). Is there a possibility to use the old structure of 
> the database I extended or do I have to copy them with new 
> names in the various directories?
> 
> Thanks you for your help.
> 
> Tobias
> 
> -----Urspr√ľngliche Nachricht-----
> Von: Thomas Fischer [mailto:tfischer@apache.org]
> Gesendet: Sonntag, 16. Juli 2006 12:58
> An: Apache Torque Developers List
> Betreff: Re: Datatype mapping in Torque 3.2
> 
> 
> 
> On Sun, 16 Jul 2006, Thomas Vandahl wrote:
> 
> > Thomas Fischer wrote:
> >> - 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)
> >
> > One comment about this. As you know, I try to collect the database 
> > specific features in the database adapters. The platform 
> > implementation, however, is part of the generator and contains 
> > database specific stuff, too. Does that make sense? Wouldn't it be 
> > better to combine them both in one database specific class?
> 
> Not so sure about this.
> - The information about the database needed in the generator 
> and in the
> runtime are different, so the only benefit would be to have one class
> instead of two
> - the build process would be complicated, as the class would 
> have to be
> delievered in the runtime and the generator
> 
>     Thomas
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
> 
> 

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication
or may otherwise be privileged or confidential and are intended solely for the individual
or entity to whom they are addressed.  If you are not the intended recipient you may not rely
on the contents of this email or any attachments, and we ask that you  please not read, copy
or retransmit this communication, but reply to the sender and destroy the email, its contents,
and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying
of this communication is strictly prohibited.



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


Mime
View raw message