(no commit message)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSet.pm
index 32b42b5..5212799 100644 (file)
@@ -724,6 +724,7 @@ sub next {
   if ($self->{stashed_objects}) {
     my $obj = shift(@{$self->{stashed_objects}});
     delete $self->{stashed_objects} unless @{$self->{stashed_objects}};
+    return $obj;
   }
   my @row = (
     exists $self->{stashed_row}
@@ -1106,7 +1107,15 @@ sub update {
     unless ref $values eq 'HASH';
 
   my $cond = $self->_cond_for_update_delete;
-
+  
+  my $bind_attributes;
+  foreach my $column ($self->result_source->columns) {
+  
+    $bind_attributes->{$column} = $self->result_source->column_info($column)->{bind_attributes}
+     if defined $self->result_source->column_info($column)->{bind_attributes};
+  }
+  $self->result_source->storage->bind_attributes($bind_attributes);
+  
   return $self->result_source->storage->update(
     $self->result_source->from, $values, $cond
   );
@@ -1766,8 +1775,8 @@ Which column(s) to order the results by. This is currently passed
 through directly to SQL, so you can give e.g. C<year DESC> for a
 descending order on the column `year'.
 
-Please note that if you have quoting enabled (see
-L<DBIx::Class::Storage/quote_char>) you will need to do C<\'year DESC' > to
+Please note that if you have C<quote_char> enabled (see
+L<DBIx::Class::Storage::DBI/connect_info>) you will need to do C<\'year DESC' > to
 specify an order. (The scalar ref causes it to be passed as raw sql to the DB,
 so you will need to manually quote things as appropriate.)