[Bast-commits] r9322 - DBIx-Class/0.08/trunk/lib/DBIx/Class

nigel at dev.catalyst.perl.org nigel at dev.catalyst.perl.org
Fri May 7 13:48:19 GMT 2010


Author: nigel
Date: 2010-05-07 14:48:19 +0100 (Fri, 07 May 2010)
New Revision: 9322

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
Log:
empty update OK even if row is not in database (fixed2)

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm	2010-05-07 13:39:37 UTC (rev 9321)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Row.pm	2010-05-07 13:48:19 UTC (rev 9322)
@@ -519,14 +519,14 @@
 sub update {
   my ($self, $upd) = @_;
 
+  my $ident_cond = $self->{_orig_ident} || $self->ident_condition;
+
   $self->set_inflated_columns($upd) if $upd;
   my %to_update = $self->get_dirty_columns;
   return $self unless keys %to_update;
 
   $self->throw_exception( "Not in database" ) unless $self->in_storage;
 
-  my $ident_cond = $self->{_orig_ident} || $self->ident_condition;
-
   $self->throw_exception('Unable to update a row with incomplete or no identity')
     if ! keys %$ident_cond;
 




More information about the Bast-commits mailing list