I've been I think it might be a bug in TT, but there is some perl magic
going on that is making it confusing.  I thought that adding the
"list()" virtual method might work:

constraint.fields.list.join(', ')

But that just returns a set of hashes (The list() method seems to make
it lose it's blessing and become list of hashes, rather than make it a
single element in a list.

Anyone else have any thoughts?

Ben

On Sat, 2006-11-04 at 00:00 +0900, 荒川則泰 wrote:
> 2) 'SQL-Translator-0.07/t/18ttschema-producer.t'
>     fails with TT V2.15.
> SQL-Translator-0.07/t/data/template/basic.tt
> ---------------------------------------------------
>     38        Constraints
>     39            [%- FOREACH constraint = table.get_constraints %]
>     40            [% constraint.name OR "?" %]
>     41                type:             [% constraint.type %]
>     42                fields:           [% constraint.fields.join(', ') %]
> ---------------------------------------------------
> 
> When there is only one filed as test case,
> 'constraint.fields' will assigned to a 'SQL::Translator::Schema::Constraint'
> object itself instead of a list of objects with only one element.
> 
> With TT V2.14 which is provided as Debian Gnu/Linux package,
> a scalar value promote to one-element  list  for LIST_OPS like 'join'
> even if the scalar value is a object.
> 
> However with TT V2.15, this  promotion doesn't occur for the object.
> Therefore, "constraint.fields.join(', ')" is evaluated to ''
>  and test fails.
> 
> 
> Indeed, I'm not sure which is wrong, 'TT V2.15' or 'SQL::Translator'.
> So this is just a information.
> 
>  - N. Arakawa
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-- 
sqlfairy-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers

Reply via email to