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

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Thu Nov 12 23:24:57 GMT 2009


Author: ribasushi
Date: 2009-11-12 23:24:56 +0000 (Thu, 12 Nov 2009)
New Revision: 7873

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm
Log:
Some cleanup

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 23:13:40 UTC (rev 7872)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI.pm	2009-11-12 23:24:56 UTC (rev 7873)
@@ -1549,20 +1549,20 @@
 }
 
 sub update {
-  my ($self, $source, $data, $where, @args) = @_; 
+  my ($self, $source, @args) = @_; 
 
   my $bind_attrs = $self->source_bind_attributes($source);
 
-  return $self->_execute('update' => [], $source, $bind_attrs, $data, $where, @args);
+  return $self->_execute('update' => [], $source, $bind_attrs, @args);
 }
 
 
 sub delete {
-  my ($self, $source, $where, @args) = @_;
+  my ($self, $source, @args) = @_;
 
   my $bind_attrs = $self->source_bind_attributes($source);
 
-  return $self->_execute('delete' => [], $source, $bind_attrs, $where, @args);
+  return $self->_execute('delete' => [], $source, $bind_attrs, @args);
 }
 
 # Most databases do not allow aliasing of tables in UPDATE/DELETE. Thus
@@ -1634,16 +1634,7 @@
 
   my $rsrc = $rs->result_source;
 
-  # we already check this, but double check naively just in case. Should be removed soon
-  my $sel = $rs->_resolved_attrs->{select};
-  $sel = [ $sel ] unless ref $sel eq 'ARRAY';
   my @pcols = $rsrc->primary_columns;
-  if (@$sel != @pcols) {
-    $self->throw_exception (
-      'Subquery update/delete can not be called on resultsets selecting a'
-     .' number of columns different than the number of primary keys'
-    );
-  }
 
   if (@pcols == 1) {
     return $self->$op (




More information about the Bast-commits mailing list