Restore ability to handle underdefined root (t/prefetch/incomplete.t)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / AutoUpdate.pm
index e61e167..c32c125 100644 (file)
@@ -1,4 +1,5 @@
-package DBIx::Class::CDBICompat::AutoUpdate;
+package # hide from PAUSE
+    DBIx::Class::CDBICompat::AutoUpdate;
 
 use strict;
 use warnings;
@@ -7,10 +8,11 @@ use base qw/Class::Data::Inheritable/;
 
 __PACKAGE__->mk_classdata('__AutoCommit');
 
-sub set {
+sub set_column {
   my $self = shift;
-  $self->NEXT::set(@_);
-  $self->update if ($self->autoupdate && $self->{_in_database});
+  my $ret = $self->next::method(@_);
+  $self->update if ($self->autoupdate && $self->{_in_storage});
+  return $ret;
 }
 
 sub autoupdate {