Showing 1 changed files with 12 additions and 10 deletions
+12 -10
lib/DBIx/Custom.pm
... ...
@@ -429,17 +429,19 @@ sub execute {
429 429
     # Select statement
430 430
     if ($sth->{NUM_OF_FIELDS}) {
431 431
         
432
-        # Filter
432
+        # DEPRECATED! Filter
433 433
         my $filter = {};
434
-        $filter->{in}  = {};
435
-        $filter->{end} = {};
436
-        push @$tables, $main_table if $main_table;
437
-        foreach my $table (@$tables) {
438
-            foreach my $way (qw/in end/) {
439
-                $filter->{$way} = {
440
-                    %{$filter->{$way}},
441
-                    %{$self->{filter}{$way}{$table} || {}}
442
-                };
434
+        if ($self->{filter}{on}) {
435
+            $filter->{in}  = {};
436
+            $filter->{end} = {};
437
+            push @$tables, $main_table if $main_table;
438
+            foreach my $table (@$tables) {
439
+                foreach my $way (qw/in end/) {
440
+                    $filter->{$way} = {
441
+                        %{$filter->{$way}},
442
+                        %{$self->{filter}{$way}{$table} || {}}
443
+                    };
444
+                }
443 445
             }
444 446
         }
445 447