[Catalyst] order_by not sorting

J Cook jcook713 at gmail.com
Sat Sep 2 16:36:50 CEST 2006


Hi,

I have the following snippet that accesses a Lookup table that will 
populate a drop-down list. I'm using the Formbuilder plugin and the 
table lookup has 4 fields - lookup_key, name, value, and sort(its a 
legacy table). The following fills in the select field but does not sort 
it correctly:


     $c->form->field(name    => 'country',
                     options => { map { $_->name => $_->value }
                                  $c->model('MyAppDB::Lookup')->search(
                                     { lookup_key => 'Country' },
                                     { order_by => 'sort' }),
                                 }
                     );

The sort field is an integer type. Why isn't this ordering it?

Justin



More information about the Catalyst mailing list