I am running into the following situation a lot:  

I do a select on a table, one of it's fields is a pkey into another table.
I then set up a hashtable for the secondtable so that the template
writer can get the reference:

#foreach ($movie in $movies)
   #set $type = $movieTypes.get($movie.MovieTypeID)

   blah blah blah
   $movie.Name
   $type   

#end

1. Is there a solution for this that I am missing ?

2. If not, how about adding a new column type to torque

   <column name=... type=VIRTUAL> 

   All that will do is add the following to the BaseObject.

      Object getXXX() {...}
      void setXX(Object o) {...}
      
   so the Programmer is then responsible for calling setXXX() and the
   template writer can use the Object returned from getXXX()
   e.g  $movie.movieType or perhaps 
        $movie.movieType.Name 


3.  This allows you to provide more logical objects to the template writer
    and the template writer has a cleaner interface to what he needs
    to concentrate on.


thanks,

mike


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to