From: Peter Rabbitson Date: Mon, 17 Jan 2011 11:12:03 +0000 (+0100) Subject: Fix stupid stupid ommission RT#64839 X-Git-Tag: v0.08127~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f70b86f99991081454c96e305ba1c046473113b4;p=dbsrgits%2FDBIx-Class.git Fix stupid stupid ommission RT#64839 --- diff --git a/Changes b/Changes index c4256b9..1bc1108 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,8 @@ Revision history for DBIx::Class * Fixes - Throw comprehensible exception on erroneous $schema->source() invocation + - Fix sloppy refactor of RSrc::sequence back from 89170201 + (RT#64839) 0.08126_01 2011-01-14 14:00 (UTC) * New Features / Changes diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index 46ad67a..1dca0a6 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -633,12 +633,11 @@ will be applied to the L of each L sub sequence { my ($self,$seq) = @_; - my $rsrc = $self->result_source; - my @pks = $rsrc->primary_columns + my @pks = $self->primary_columns or next; $_->{sequence} = $seq - for values %{ $rsrc->columns_info (\@pks) }; + for values %{ $self->columns_info (\@pks) }; } diff --git a/t/lib/DBICTest/Schema/Dummy.pm b/t/lib/DBICTest/Schema/Dummy.pm index 2a8396d..b4ab736 100644 --- a/t/lib/DBICTest/Schema/Dummy.pm +++ b/t/lib/DBICTest/Schema/Dummy.pm @@ -20,4 +20,7 @@ __PACKAGE__->add_columns( ); __PACKAGE__->set_primary_key('id'); +# part of a test, do not remove +__PACKAGE__->sequence('bogus'); + 1;