You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Marc Lustig <ml...@marclustig.com> on 2003/02/21 12:01:19 UTC

how to modify Object.vm ?

I have added a convenience method to om/Object.vm:

public void clear${relCol}() ...

I posted this request 2 days ago, I need some advise why Torque is not
generating this method into the BaseObjects.
Either Torque 3.1-dev uses another file.vm or it just ignores my method for
some reason.

My Object.vm is attached.

Marc

Re: how to modify Object.vm ?

Posted by Andreou Andreas <an...@di.uoa.gr>.
Check om/Object.vm of your jar ...
Does it have your changes???
Also, if your settings dictate that the OM will use managers,
you should change the ObjectWithManager.vm file...


Re: how to use torque.useClasspath = true

Posted by Bill <bh...@collaborativefusion.com>.
> But I wonder how to use "torque.useClasspath = true" in order not to rebuild
> the jar after each modification of the templates.
> The Description says: "If true, Torque will not look in the  templatePath
> directory, for templates, but instead load them from the classpath, allowing
> you to use Torque without extracting it from the jar."

Marc

The Torque jar file contains the templates Torque uses to generate the
objects and so forth.  If you remember in TDK2.1, in the build directory
there was a bin/torque directory.  Under this hierarchy was where the
db.props files were for each database, etc.  This is all in the jar now
that Torque has been decoupled.  If you have torque.useClasspath set to
true, then Torque will use the files in the jar.  If its set to false,
then Torque will use the property, torque.templatePath to determine
where these files exist in the file system.

Does this help?

-b 



Re: how to use torque.useClasspath = true

Posted by Scott Eade <se...@backstagetech.com.au>.
On 21/02/2003 11:06 PM, "Marc Lustig" <ml...@marclustig.com> wrote:

> What exactly does that mean "load them from the classpath".
> Do I just need to add the path/to/where/the/templates/reside/ to my
> system-path (w2k) or how is this supposed to work ?

Velocity supports loading vm files from files (a location in the filesystem)
or from the classpath (be it the files in the filesystem on the classpath or
be they packaged in a jar file on the classpath).

I haven't used the property in question myself so I can't easily offer
assistance.

HTH,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
.Mac Chat/AIM: seade at mac dot com



R: how to use torque.useClasspath = true

Posted by Raffaele Ragni <ra...@cone.it>.
I think it loads it from the jar file, but it assumes you include that
jar in the classpath when you compile it (with ant?).
At least it's how works with me.

-----Messaggio originale-----
Da: Marc Lustig [mailto:ml@marclustig.com] 
Inviato: venerdì 21 febbraio 2003 13.06
A: Turbine Torque Users List
Oggetto: how to use torque.useClasspath = true

Thanks Scott and Andreou, I wasn't aware of those properties needed to
consider. Now my methods are generated properly.

But I wonder how to use "torque.useClasspath = true" in order not to
rebuild
the jar after each modification of the templates.
The Description says: "If true, Torque will not look in the
templatePath
directory, for templates, but instead load them from the classpath,
allowing
you to use Torque without extracting it from the jar."

What exactly does that mean "load them from the classpath".
Do I just need to add the path/to/where/the/templates/reside/ to my
system-path (w2k) or how is this supposed to work ?

I couldn't find a hint in the mailing archive...

Marc


> -----Ursprungliche Nachricht-----
> Von: Scott Eade [mailto:seade@backstagetech.com.au]
> Gesendet: Freitag, 21. Februar 2003 12:06
> An: Torque Users List
> Betreff: Re: how to modify Object.vm ?
>
>
> On 21/02/2003 10:01 PM, "Marc Lustig" <ml...@marclustig.com> wrote:
>
> > Either Torque 3.1-dev uses another file.vm or it just ignores
> my method for
> > some reason.
>
> Marc,
>
> There is a property that determines whether torque will use the vm
files
> packaged in the jar file or extracted out on disc - make sure you have
the
> right setting for this property (see the torque site for the
> property name).
>
> Cheers,
>
> Scott
> --
> Scott Eade
> Backstage Technologies Pty. Ltd.
> http://www.backstagetech.com.au
> .Mac Chat/AIM: seade at mac dot com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


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



how to use torque.useClasspath = true

Posted by Marc Lustig <ml...@marclustig.com>.
Thanks Scott and Andreou, I wasn't aware of those properties needed to
consider. Now my methods are generated properly.

But I wonder how to use "torque.useClasspath = true" in order not to rebuild
the jar after each modification of the templates.
The Description says: "If true, Torque will not look in the  templatePath
directory, for templates, but instead load them from the classpath, allowing
you to use Torque without extracting it from the jar."

What exactly does that mean "load them from the classpath".
Do I just need to add the path/to/where/the/templates/reside/ to my
system-path (w2k) or how is this supposed to work ?

I couldn't find a hint in the mailing archive...

Marc


> -----Ursprungliche Nachricht-----
> Von: Scott Eade [mailto:seade@backstagetech.com.au]
> Gesendet: Freitag, 21. Februar 2003 12:06
> An: Torque Users List
> Betreff: Re: how to modify Object.vm ?
>
>
> On 21/02/2003 10:01 PM, "Marc Lustig" <ml...@marclustig.com> wrote:
>
> > Either Torque 3.1-dev uses another file.vm or it just ignores
> my method for
> > some reason.
>
> Marc,
>
> There is a property that determines whether torque will use the vm files
> packaged in the jar file or extracted out on disc - make sure you have the
> right setting for this property (see the torque site for the
> property name).
>
> Cheers,
>
> Scott
> --
> Scott Eade
> Backstage Technologies Pty. Ltd.
> http://www.backstagetech.com.au
> .Mac Chat/AIM: seade at mac dot com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


Re: how to modify Object.vm ?

Posted by Scott Eade <se...@backstagetech.com.au>.
On 21/02/2003 10:01 PM, "Marc Lustig" <ml...@marclustig.com> wrote:

> Either Torque 3.1-dev uses another file.vm or it just ignores my method for
> some reason.

Marc,

There is a property that determines whether torque will use the vm files
packaged in the jar file or extracted out on disc - make sure you have the
right setting for this property (see the torque site for the property name).

Cheers,

Scott
-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au
.Mac Chat/AIM: seade at mac dot com