X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FTwoKeys.pm;h=bfb6c42b106ce27472de6f33ed6103e132e86856;hb=1a6253045dddc5f3c0f1c80be436acb7c6ec5455;hp=7bb1965d7d50a56c68007643c0a3007118ec6750;hpb=3bd6e3e0f621c4fe3d7562827a9b86ee5b91cbf2;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/DBICTest/Schema/TwoKeys.pm b/t/lib/DBICTest/Schema/TwoKeys.pm old mode 100755 new mode 100644 index 7bb1965..bfb6c42 --- a/t/lib/DBICTest/Schema/TwoKeys.pm +++ b/t/lib/DBICTest/Schema/TwoKeys.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::TwoKeys; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('twokeys'); __PACKAGE__->add_columns( @@ -10,8 +10,12 @@ __PACKAGE__->add_columns( ); __PACKAGE__->set_primary_key(qw/artist cd/); -__PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' ); -__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD' ); +__PACKAGE__->belongs_to( + artist => 'DBICTest::Schema::Artist', + {'foreign.artistid'=>'self.artist'}, +); + +__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD', undef, { is_deferrable => 0, add_fk_index => 0 } ); __PACKAGE__->has_many( 'fourkeys_to_twokeys', 'DBICTest::Schema::FourKeys_to_TwoKeys', {