Hi,
In the SQL "world", column names with several words are usually
separated by underlines "_"
Torque uses this naming convention to generate java variable names, and
getters and setters are generated with each word with the first char in
uppercase
and removes underlines,
Following your example, if you have a SQL column called DATE_POSTED,
Torque will generate a private variable named "date_posted" and following
methods "getDatePosted()", "setDatePosted(...)". This value would be
accessible
from Velocity as "DatePosted", or "getDatePosted()".
Hope this helps,
Regards,
Edward.
Sean Leach wrote:
> This may be a silly question, but why does Torque generate lowercase Java
> variable names on all columns in the object schema?
>
> For example, if I have a column named "datePosted", I would assume I would
> get the resulting java var to be datePosted, with getDatePosted() etc.
> following normal Java naming scheme, instead I get dateposted and
> getDateposted()
>
> I know I can change it in the Object.vm file etc., but I was just curious
> why that decision was made. There may be something I am missing...
>
> Forgive me if so :)
>
> Sean
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]