Showing 1 changed files with 10 additions and 7 deletions
+10 -7
lib/DBIx/Custom.pm
... ...
@@ -371,15 +371,17 @@ sub execute {
371 371
         }
372 372
     }
373 373
     
374
-    # Applied filter
375
-    my $applied_filter = {};
376
-    foreach my $table (@$tables) {
377
-        $applied_filter = {
378
-            %$applied_filter,
379
-            %{$self->{filter}{out}->{$table} || {}}
374
+    # Applied filter(DEPRECATED!)
375
+    if ($self->{filter}{on}) {
376
+        my $applied_filter = {};
377
+        foreach my $table (@$tables) {
378
+            $applied_filter = {
379
+                %$applied_filter,
380
+                %{$self->{filter}{out}->{$table} || {}}
381
+            }
380 382
         }
383
+        $filter = {%$applied_filter, %$filter};
381 384
     }
382
-    $filter = {%$applied_filter, %$filter};
383 385
     
384 386
     # Replace filter name to code
385 387
     foreach my $column (keys %$filter) {
... ...
@@ -1464,6 +1466,7 @@ sub _apply_filter {
1464 1466
 
1465 1467
     # Initialize filters
1466 1468
     $self->{filter} ||= {};
1469
+    $self->{filter}{on} = 1;
1467 1470
     $self->{filter}{out} ||= {};
1468 1471
     $self->{filter}{in} ||= {};
1469 1472
     $self->{filter}{end} ||= {};