[Dbix-class] Union and Limit
Mike Raynham
catalyst at mikeraynham.co.uk
Tue Feb 8 23:59:26 GMT 2011
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
More information about the DBIx-Class
mailing list