[Bps-public-commit] dbix-searchbuilder branch, joins_are_distinct, created. 1.61-9-g8c85566

Ruslan Zakirov ruz at bestpractical.com
Tue Sep 4 10:12:45 EDT 2012


The branch, joins_are_distinct has been created
        at  8c85566ba72e61af09010ff32ca8151091e2b33f (commit)

- Log -----------------------------------------------------------------
commit 8c85566ba72e61af09010ff32ca8151091e2b33f
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Tue Sep 4 18:11:36 2012 +0400

    replace distinct_in_join with joins_are_distinct

diff --git a/lib/DBIx/SearchBuilder.pm b/lib/DBIx/SearchBuilder.pm
index bed0c59..132d37a 100755
--- a/lib/DBIx/SearchBuilder.pm
+++ b/lib/DBIx/SearchBuilder.pm
@@ -134,7 +134,7 @@ sub CleanSlate {
     $self->{'first_row'}        = 0;
     $self->{'must_redo_search'} = 1;
     $self->{'show_rows'}        = 0;
-    $self->{'distinct_in_join'} = 1;
+    $self->{'joins_are_distinct'} = 0;
     @{ $self->{'aliases'} } = ();
 
     delete $self->{$_} for qw(
@@ -438,7 +438,7 @@ sub BuildSelectQuery {
         $QueryString .= $clause;
         $QueryString .= $self->_OrderClause;
     }
-    elsif ($self->_isJoined && $self->{'distinct_in_join'}) {
+    elsif ( !$self->{'joins_are_distinct'} && $self->_isJoined ) {
         $self->_DistinctQuery(\$QueryString);
     }
     else {

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list