fix sequence method in PK::Auto
David Kamholz [Sun, 12 Feb 2006 13:36:08 +0000 (13:36 +0000)]
lib/DBIx/Class/PK/Auto.pm

index 5bf069a..f79eca5 100644 (file)
@@ -72,7 +72,12 @@ associated with looking up the sequence automatically.
 
 =cut
 
-__PACKAGE__->mk_classdata('sequence');
+sub sequence {
+    my ($self,$seq) = @_;
+    foreach my $pri ($self->primary_columns) {
+        $self->column_info($pri)->{sequence} = $seq;
+    }
+}
 
 1;