[Bast-commits] r7870 - DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Thu Nov 12 10:15:13 GMT 2009


Author: ribasushi
Date: 2009-11-12 10:15:12 +0000 (Thu, 12 Nov 2009)
New Revision: 7870

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
Log:
Clarifying comment

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm	2009-11-12 10:10:04 UTC (rev 7869)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm	2009-11-12 10:15:12 UTC (rev 7870)
@@ -1567,6 +1567,14 @@
   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) = @_;
 




More information about the Bast-commits mailing list