Subject: | Class::DBI .. search_like ignores order_by |
if I do something like
$iterator = $t->search_like ( {"name" => $filtername, "description" => $filterdesc },
{ order_by=>"requested_deployment desc"} );
it ignores the order_by clause.
in sub _do_search you do something like
@args = %{ $args[0] } if ref $args[0] eq "HASH";
which I think looses $args[1] if it is there.
my ugly fix was to do:
my $search_opts;
if (@args >1 && ref $args[1] eq "HASH") {
$search_opts = $args[1];
}
else {
$search_opts = @args % 2 ? pop @args : {};
}
just above that line which sets the search_opts before you play with the @args. it seems to work for me.
(aploagies if this is fixed in 0.95, I looked at the changelog and couldn't see it)