Hi,

I've had a bit of a bit of a dig around in the SetOperations source, and my particular instance of the problem can be fixed with the patch that follows. However, I have no idea if this will adversely affect the other set operations, or other DBMSs. I'm not sure of the correct course of action here - do I submit a bug report along with the patch?


diff --git a/lib/DBIx/Class/Helper/ResultSet/SetOperations.pm b/lib/DBIx/Class/Helper/ResultSet/SetOperations.pm
index 4851238..7dec7b1 100644
--- a/lib/DBIx/Class/Helper/ResultSet/SetOperations.pm
+++ b/lib/DBIx/Class/Helper/ResultSet/SetOperations.pm
@@ -79,7 +79,7 @@ sub _set_operation {
       push @params, @{$bind};
    }

-   my $query = q<(> . join(" $operation ", @sql). q<)>;
+   my $query = q<((> . join(") $operation (", @sql). q<))>;

    my $attrs = $self->_resolved_attrs;
    return $self->result_source->resultset->search(undef, {




Thanks,

Mike




_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to