X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSet.pm;h=4a15e22945ebed1db9a5fc1269191b3d5d41b2a3;hb=dda9af557c2385fb280d95dce3c4638a65bf9dd8;hp=b5c36e4ef54a13b67515435aacf9b7a35bb1b21e;hpb=5a93e13839bf87b798204f40dffa54db94002fbb;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index b5c36e4..4a15e22 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -264,6 +264,13 @@ sub search_rs { Pass a literal chunk of SQL to be added to the conditional part of the resultset query. +CAVEAT: C is provided for Class::DBI compatibility and should +only be used in that context. There are known problems using C +in chained queries; it can result in bind values in the wrong order. See +L and +L for seaching techniques that do not +require C. + =cut sub search_literal { @@ -1449,9 +1456,12 @@ sub new_result { my $alias = $self->{attrs}{alias}; my $collapsed_cond = $self->{cond} ? $self->_collapse_cond($self->{cond}) : {}; + + # precendence must be given to passed values over values inherited from the cond, + # so the order here is important. my %new = ( - %{ $self->_remove_alias($values, $alias) }, %{ $self->_remove_alias($collapsed_cond, $alias) }, + %{ $self->_remove_alias($values, $alias) }, -source_handle => $self->_source_handle, -result_source => $self->result_source, # DO NOT REMOVE THIS, REQUIRED ); @@ -2209,11 +2219,10 @@ Indicates additional column names for those added via L<+select>. =back -Indicates column names for object inflation. That is, c< as > +Indicates column names for object inflation. That is, C indicates the name that the column can be accessed as via the C method (or via the object accessor, B). It has nothing to do with the SQL code C< SELECT foo AS bar ->. +exists>). It has nothing to do with the SQL code C, usually when C