my $filters = _get_filters($class);
- return ($key, $value) unless $filters->{$key};
+ return ($prefix . $key, $value) unless $filters->{$key};
return $filters->{$key}->($key, $value, $prefix);
}
use lib 't';
-use Test::More tests => 27;
+use Test::More tests => 28;
use Test::Deep;
use Data::Dumper;
query => [ 'customer.description' => 'test' ],
with_objects => [ 'customer' ]
}, 'with_objects: no duplicates', with_objects => [ 'customer' ];
+
+test {
+ part => {
+ 'partnumber:substr::ilike' => '1',
+ },
+}, {
+ query => [
+ 'part.partnumber', {
+ ilike => '%1%'
+ }
+ ]
+}, 'Regression check: prefixing of fallback filtering in relation with custom filters', class => 'SL::DB::Manager::OrderItem';