Revision bece5567
Von Sven Schöling vor fast 11 Jahren hinzugefügt
SL/DB/Helper/Filtered.pm | ||
---|---|---|
14 | 14 |
|
15 | 15 |
my $filters = _get_filters($class); |
16 | 16 |
|
17 |
return ($key, $value) unless $filters->{$key}; |
|
17 |
return ($prefix . $key, $value) unless $filters->{$key};
|
|
18 | 18 |
|
19 | 19 |
return $filters->{$key}->($key, $value, $prefix); |
20 | 20 |
} |
t/controllers/helpers/parse_filter.t | ||
---|---|---|
1 | 1 |
use lib 't'; |
2 | 2 |
|
3 |
use Test::More tests => 27;
|
|
3 |
use Test::More tests => 28;
|
|
4 | 4 |
use Test::Deep; |
5 | 5 |
use Data::Dumper; |
6 | 6 |
|
... | ... | |
281 | 281 |
query => [ 'customer.description' => 'test' ], |
282 | 282 |
with_objects => [ 'customer' ] |
283 | 283 |
}, 'with_objects: no duplicates', with_objects => [ 'customer' ]; |
284 |
|
|
285 |
test { |
|
286 |
part => { |
|
287 |
'partnumber:substr::ilike' => '1', |
|
288 |
}, |
|
289 |
}, { |
|
290 |
query => [ |
|
291 |
'part.partnumber', { |
|
292 |
ilike => '%1%' |
|
293 |
} |
|
294 |
] |
|
295 |
}, 'Regression check: prefixing of fallback filtering in relation with custom filters', class => 'SL::DB::Manager::OrderItem'; |
Auch abrufbar als: Unified diff
Custom GetModels Filter: Präfixing von Fallback Filtern in Relationen mit Custom Filtern fehlte.