X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FForceForeign.pm;h=c340d8bae654dce65cea0e2393c8db0ab1cc6f24;hb=157ce0cfdee831491de41596b44e19cd7b45dfeb;hp=e3b2857ff7d1a153be37862f83594c266c4144a6;hpb=5b0b10fe7ae786a335ff61dfd83d0a717c56e020;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/DBICTest/Schema/ForceForeign.pm b/t/lib/DBICTest/Schema/ForceForeign.pm index e3b2857..c340d8b 100644 --- a/t/lib/DBICTest/Schema/ForceForeign.pm +++ b/t/lib/DBICTest/Schema/ForceForeign.pm @@ -1,7 +1,7 @@ package # hide from PAUSE DBICTest::Schema::ForceForeign; -use base 'DBIx::Class::Core'; +use base qw/DBICTest::BaseResult/; __PACKAGE__->table('forceforeign'); __PACKAGE__->add_columns( @@ -12,21 +12,21 @@ __PACKAGE__->set_primary_key(qw/artist/); # Normally this would not appear as a FK constraint # since it uses the PK -__PACKAGE__->might_have( - 'artist_1', 'DBICTest::Schema::Artist', { - 'foreign.artist_id' => 'self.artist', - }, { - is_foreign_key_constraint => 1, - }, +__PACKAGE__->might_have('artist_1', 'DBICTest::Schema::Artist', + { 'foreign.artistid' => 'self.artist' }, + { is_foreign_key_constraint => 1 }, ); # Normally this would appear as a FK constraint -__PACKAGE__->might_have( - 'cd_1', 'DBICTest::Schema::CD', { - 'foreign.cdid' => 'self.cd', - }, { - is_foreign_key_constraint => 0, - }, +__PACKAGE__->might_have('cd_1', 'DBICTest::Schema::CD', + { 'foreign.cdid' => 'self.cd' }, + { is_foreign_key_constraint => 0 }, +); + +# Normally this would appear as a FK constraint +__PACKAGE__->belongs_to('cd_3', 'DBICTest::Schema::CD', + { 'foreign.cdid' => 'self.cd' }, + { is_foreign_key_constraint => 0 }, ); 1;