From: Alexander Hartmaier Date: Fri, 13 Nov 2009 12:05:45 +0000 (+0000) Subject: seems I found the bugger X-Git-Tag: v0.08116~140^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=18129e8117befc4681180910901210aeef4fdf42;p=dbsrgits%2FDBIx-Class.git seems I found the bugger --- diff --git a/t/lib/DBICTest/Schema/Track.pm b/t/lib/DBICTest/Schema/Track.pm index d7ba952..0a6c346 100644 --- a/t/lib/DBICTest/Schema/Track.pm +++ b/t/lib/DBICTest/Schema/Track.pm @@ -50,4 +50,15 @@ __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' ); +__PACKAGE__->belongs_to( + "year1999cd", + "DBICTest::Schema::Year1999CDs", + { "foreign.cdid" => "self.cd" }, +); +__PACKAGE__->belongs_to( + "year2000cd", + "DBICTest::Schema::Year2000CDs", + { "foreign.cdid" => "self.cd" }, +); + 1; diff --git a/t/lib/DBICTest/Schema/Year1999CDs.pm b/t/lib/DBICTest/Schema/Year1999CDs.pm index 29b3666..e629e45 100644 --- a/t/lib/DBICTest/Schema/Year1999CDs.pm +++ b/t/lib/DBICTest/Schema/Year1999CDs.pm @@ -29,6 +29,7 @@ __PACKAGE__->set_primary_key('cdid'); __PACKAGE__->add_unique_constraint([ qw/artist title/ ]); __PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' ); -__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track' ); +__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track', + { "foreign.cd" => "self.cdid" }); 1; diff --git a/t/lib/DBICTest/Schema/Year2000CDs.pm b/t/lib/DBICTest/Schema/Year2000CDs.pm index 888ccb8..6a09ef0 100644 --- a/t/lib/DBICTest/Schema/Year2000CDs.pm +++ b/t/lib/DBICTest/Schema/Year2000CDs.pm @@ -28,6 +28,7 @@ __PACKAGE__->set_primary_key('cdid'); __PACKAGE__->add_unique_constraint([ qw/artist title/ ]); __PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' ); -__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track' ); +__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track', + { "foreign.cd" => "self.cdid" }); 1;