You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by josef richberg <sq...@yahoo.com> on 2001/12/12 21:04:39 UTC

adding new types to Torque..mysql

I'm looking to adjust the way the Mysql schema is
created using torque.  I am loooking at adding some
keywords and modifiying the resultant .sql file.  I
looked at adding a keyword to
tdk/share/conf/torque/templates/sql/base/mysql/db.props.
 The line I added was:
   MEDIUMINT=MEDIUMINT
When I try to use it in type="MEDIUMINT", I get the
following error(in velocity log):

"Method get threw exception for reference $dbprops in
/sql/base/mysql/columns.vm at [2,20]"

That line is "#set ( $type = $dbprops.get($col.Type)
)"

Shouldn't this pick up the column type from the
db.props file?

--josef

__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Clarification: booleans in context

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 12/13/01 9:46 AM, "Colm McCartan" <co...@owl.co.uk> wrote:

> Hello all,
> 
> From the Users Guide:
> 
>> The variable $foo is evaluated to determine whether it is
>>       true, which will happen under one of two circumstances: (i)
>>       $foo is a boolean (true/false) which has a true value, or
>>       (ii) the value is not null.
> 
> 
> 
> Can I just clarify this: in case (i) are we talking about a boolean
> primitive only (as opposed to a wrapper Boolean) that can be pushed into
> the context?

Everything in the context is an Object, so it would be Boolean.TRUE or
Boolean.FALSE

> 
> What if the decision is based on an object method that returns a
> (wrapper) Boolean - as long as it is non-null it will evaluate as true, yes?

No - if that Boolean was Boolean.FALSE, it would eval to false...



-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Clarification: booleans in context

Posted by Colm McCartan <co...@owl.co.uk>.
Hello all,

 From the Users Guide:

> The variable $foo is evaluated to determine whether it is
>       true, which will happen under one of two circumstances: (i)
>       $foo is a boolean (true/false) which has a true value, or
>       (ii) the value is not null.



Can I just clarify this: in case (i) are we talking about a boolean 
primitive only (as opposed to a wrapper Boolean) that can be pushed into 
the context?

What if the decision is based on an object method that returns a 
(wrapper) Boolean - as long as it is non-null it will evaluate as true, yes?

Thanks
colm




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: adding new types to Torque..mysql

Posted by josef richberg <sq...@yahoo.com>.
sorry wasn't sure.  saw .vm and figure Velocity..

--josef
--- "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> On 12/12/01 3:04 PM, "josef richberg"
> <sq...@yahoo.com> wrote:
> 
> > I'm looking to adjust the way the Mysql schema is
> > created using torque.  I am loooking at adding
> some
> > keywords and modifiying the resultant .sql file. 
> I
> > looked at adding a keyword to
> >
>
tdk/share/conf/torque/templates/sql/base/mysql/db.props.
> > The line I added was:
> >  MEDIUMINT=MEDIUMINT
> > When I try to use it in type="MEDIUMINT", I get
> the
> > following error(in velocity log):
> > 
> > "Method get threw exception for reference $dbprops
> in
> > /sql/base/mysql/columns.vm at [2,20]"
> > 
> > That line is "#set ( $type =
> $dbprops.get($col.Type)
> > )"
> > 
> > Shouldn't this pick up the column type from the
> > db.props file?
> > 
> 
> You might want to post this to the turbine list
> instead...
> 
> -- 
> Geir Magnusson Jr.     geirm@optonline.net
> System and Software Consulting
> "Whoever would overthrow the liberty of a nation
> must begin by subduing the
> freeness of speech." - Benjamin Franklin
> 
> 
> 
> --
> To unsubscribe, e-mail:  
>
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: adding new types to Torque..mysql

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 12/12/01 3:04 PM, "josef richberg" <sq...@yahoo.com> wrote:

> I'm looking to adjust the way the Mysql schema is
> created using torque.  I am loooking at adding some
> keywords and modifiying the resultant .sql file.  I
> looked at adding a keyword to
> tdk/share/conf/torque/templates/sql/base/mysql/db.props.
> The line I added was:
>  MEDIUMINT=MEDIUMINT
> When I try to use it in type="MEDIUMINT", I get the
> following error(in velocity log):
> 
> "Method get threw exception for reference $dbprops in
> /sql/base/mysql/columns.vm at [2,20]"
> 
> That line is "#set ( $type = $dbprops.get($col.Type)
> )"
> 
> Shouldn't this pick up the column type from the
> db.props file?
> 

You might want to post this to the turbine list instead...

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>