X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FTrack.pm;h=948597d776f5191e2e8af5cad666974b06cedea6;hb=27d619d8c3100065f87bdbcc7c1496cb2e5495c9;hp=a6de595d45d7ad0b8d2b132aca8580fe27b2f6ba;hpb=a98b5b2fcd75207a9d8e6c851eb81d5ba4372bc0;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/Track.pm b/t/lib/DBICTest/Schema/Track.pm index a6de595..948597d 100644 --- a/t/lib/DBICTest/Schema/Track.pm +++ b/t/lib/DBICTest/Schema/Track.pm @@ -34,6 +34,11 @@ __PACKAGE__->add_columns( data_type => 'smalldatetime', is_nullable => 1 }, + increment => { + data_type => 'integer', + is_nullable => 1, + accessor => '_increment', + } ); __PACKAGE__->set_primary_key('trackid'); @@ -50,4 +55,20 @@ __PACKAGE__->belongs_to( disc => 'DBICTest::Schema::CD' => 'cd'); __PACKAGE__->might_have( cd_single => 'DBICTest::Schema::CD', 'single_track' ); __PACKAGE__->might_have( lyrics => 'DBICTest::Schema::Lyrics', 'track_id' ); +sub increment { + my $self = shift; + if(@_) { + return $self->_increment($_[0] + 1); + } + return $self->_increment(); +} + +sub set_increment { + my $self = shift; + if(@_) { + return $self->_increment($_[0]); + } + return $self->_increment(); +} + 1;