Merge 'trunk' into 'DBIx-Class-current'
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / InflateColumn.pm
index f60e112..226913a 100644 (file)
@@ -124,6 +124,19 @@ sub _inflated_column_op {
   return $obj;
 }
 
+sub update {
+  my ($class, $attrs, @rest) = @_;
+  $attrs ||= {};
+  foreach my $key (keys %$attrs) {
+    if (ref $attrs->{$key}
+          && exists $class->column_info($key)->{_inflate_info}) {
+#      $attrs->{$key} = $class->_deflated_column($key, $attrs->{$key});
+      $class->set_inflated_column ($key, delete $attrs->{$key});
+    }
+  }
+  return $class->next::method($attrs, @rest);
+}
+
 sub new {
   my ($class, $attrs, @rest) = @_;
   $attrs ||= {};