From: Peter Rabbitson Date: Thu, 12 Nov 2009 10:15:12 +0000 (+0000) Subject: Clarifying comment X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0be369b018944236e65ac1d93edf60ae251b791c;p=dbsrgits%2FDBIx-Class-Historic.git Clarifying comment --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index e8c9bb2..2df9d59 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1567,6 +1567,14 @@ sub delete { return $self->_execute('delete' => [], $source, $bind_attrs, $where, @args); } +# Most databases do not allow aliasing of tables in UPDATE/DELETE. Thus +# a condition containing 'me' or other table prefixes will not work +# at all. Since we employ subqueries when multiple tables are involved +# (joins), it is relatively safe to strip all column qualifiers. Worst +# case scenario the error message will be a bit misleading, if the +# user supplies a foreign qualifier without a join (the message would +# be "can't find column X", when in fact the user shoud join T containing +# T.X) sub _strip_cond_qualifiers { my ($self, $where) = @_;