X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FArtist.pm;h=0bb49c4c4441bbac85642c8ee1ef3e91ae95d638;hb=4e4604937e2aa069e49a2fb8f3785d4562e319b3;hp=996f53c78429c7fd22cc57839a580fb4ef88674a;hpb=93cec8c3b4789ff9e7f09e06da0078eb3164486f;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/DBICTest/Schema/Artist.pm b/t/lib/DBICTest/Schema/Artist.pm index 996f53c..0bb49c4 100644 --- a/t/lib/DBICTest/Schema/Artist.pm +++ b/t/lib/DBICTest/Schema/Artist.pm @@ -3,10 +3,8 @@ package # hide from PAUSE use base 'DBIx::Class::Core'; -__PACKAGE__->load_components('Positioned','PK::Auto'); - -DBICTest::Schema::Artist->table('artist'); -DBICTest::Schema::Artist->add_columns( +__PACKAGE__->table('artist'); +__PACKAGE__->add_columns( 'artistid' => { data_type => 'integer', is_auto_increment => 1 @@ -16,17 +14,26 @@ DBICTest::Schema::Artist->add_columns( size => 100, is_nullable => 1, }, - position => { - data_type => 'integer', - }, ); -DBICTest::Schema::Artist->set_primary_key('artistid'); -__PACKAGE__->position_column('position'); +__PACKAGE__->set_primary_key('artistid'); __PACKAGE__->mk_classdata('field_name_for', { artistid => 'primary key', name => 'artist name', - position => 'list position', }); +__PACKAGE__->has_many( + cds => 'DBICTest::Schema::CD', undef, + { order_by => 'year' }, +); + +__PACKAGE__->has_many( twokeys => 'DBICTest::Schema::TwoKeys' ); +__PACKAGE__->has_many( onekeys => 'DBICTest::Schema::OneKey' ); + +__PACKAGE__->has_many( + artist_undirected_maps => 'DBICTest::Schema::ArtistUndirectedMap', + [ {'foreign.id1' => 'self.artistid'}, {'foreign.id2' => 'self.artistid'} ], + { cascade_copy => 0 } # this would *so* not make sense +); + 1;