I had the same problem with the $col.Type returning a string, and seem to
have solved it by adding a 

Object getColType() {
  return columnType;
}

method to Column.java, then changing the VM template to use $col.getColType()
instead of $col.Type

Incidentally, I also added support for the java long type, as a BIGINT database
type, which leads me to ask the question:  Are there plans to support more types
in Torque eventually?

-Pete 

 On Fri, 08 Dec 2000, you wrote:
> Thanks for taking on this task.  Yes it is a bug.  I am not sure I see
> the relationship between the Mapping classes and torque, but it seems
> your narrowing down to a solution.
> 
> 
> Mike Haberman wrote:
> > 
> > I'm having this wonderful conversation with myself :)
> > 
> > Okay, so the problem does indeed lie with in torque/model/Column.java
> > getType should return an Object not a String
> > 
> > inside of torque stuff (MapBuilder.vm, e.g.) there are calls
> > to $col.Type which is then used to do a look up in TorqueStringUtil.
> > So always returining type String isn't correct.
> > 
> > So my first post is still valid.  I think. :)
> > 
> > need sleep.
> > 
> > mike
> > 
> > On Fri, Dec 08, 2000 at 04:42:51PM -0600, Mike Haberman wrote:
> > >
> > > Can someone confirm that this is a bug.
> > > I will submit the patch asap.
> > >
> > >
> > >
> > > in BasePeer you have a lot of code doing this:
> > > if (  column.getType() instanceof String )
> > >
> > >
> > > however, in torque/model/Column.java
> > > you have
> > >
> > >  public String getType()
> > >     return type;
> > >
> > >   It should be
> > >   public Object getType()
> > >      return columnType;
> > >
> > >
> > > let me know,
> > >
> > >
> > > mike
> > >
> > >
> > >
> > > ------------------------------------------------------------
> > > To subscribe:        [EMAIL PROTECTED]
> > > To unsubscribe:      [EMAIL PROTECTED]
> > > Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> > > Problems?:           [EMAIL PROTECTED]
> > 
> > ------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> > Problems?:           [EMAIL PROTECTED]
> 
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]


------------------------------------------------------------
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