Hi I'm someone
You can change the template "Object.vm" file in the /templates/om/ folder.
By chaging this file you can add your own method to classes generated.
Sample for the fields size :
Add the code belown
#if($cjtype == "String")
/**
* Retourne la taille maximale du champs $cfc en DB
*
* @return int
*/
public static int
get${cfc}FieldSize()
{
return $col.Size;
}
#end
This method will ad a method getXXXFieldSize where XXX is the name of an
object attribute.
Guillaume
-----Original Message-----
From: Scott Eade [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 18, 2002 7:47 AM
To: Turbine Torque Users List
Subject: Re: get size of text column at runtime
> From: "Taavi Tiirik" <[EMAIL PROTECTED]>
>
> If I define a column in torque I specify it's size. For example:
>
> <column name="title" type="VARCHAR" size="2000"/>
>
> Is there a way how to get the very same size property
> using torque java api at runtime or do I need to ask this
> info from a database schema?
I don't think an obvious mechanism is provided, but I do recall someone
suggesting a way of obtaining this information either on this list or
turbine-user. Check the archives.
>
> with best wishes,
> Taavi
HTH,
Scott
--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>