[jifty-devel] possible bug in Jifty::DBI::Schema

Jesse Vincent jesse at bestpractical.com
Mon Mar 20 11:17:17 EST 2006




On Sun, Mar 19, 2006 at 04:28:29PM +1100, bart bunting wrote:
> Afternoon,
> 
> I'm seeing something very strange with a column definition.
> 
> If I define the column as shown below I end up with two additional
> items in valid_values, mandatory and 1.  However, if I reverse the
> last two lines everything behaves as expected.  

'are' is greedy. It grabs everything until the end of the definition.
Alex is working on a fix.  I believe that for now, you can say:

valid values are (qw(a b c)),
is mandatory;

And the extra parens will make it do the right thing.



> 
> Broken version:
> 
> column type => 
>   type is 'text',
>   render_as 'combobox',
>   valid_values are qw/Product Additional/,
>   is mandatory;
> 
> Working version:
> 
> column type => 
>   type is 'text',
>   render_as 'combobox'
>   is mandatory,
>   valid_values are qw/Product Additional/;
> 
> I think this is either a bug or if there is some specific order things
> should be defined in I haven't found it anywhere in the man pages.
> 
> HTH
> 
> Bart
> 
> 
> 
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
> 

-- 


More information about the jifty-devel mailing list