From 3e2e533e6a5cd7953a5e3c5c22e787da7e4451c1 Mon Sep 17 00:00:00 2001 From: Alexander Hartmaier Date: Mon, 4 Oct 2010 17:24:22 +0200 Subject: [PATCH] add_relationship without the accessor attribute is invalid --- t/lib/DBSchema/Result/Dvd.pm | 3 ++- t/lib/DBSchema/Result/Twokeys.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/t/lib/DBSchema/Result/Dvd.pm b/t/lib/DBSchema/Result/Dvd.pm index 0020109..ba34eec 100644 --- a/t/lib/DBSchema/Result/Dvd.pm +++ b/t/lib/DBSchema/Result/Dvd.pm @@ -54,9 +54,10 @@ __PACKAGE__->might_have( liner_notes => 'DBSchema::Result::LinerNotes', undef, { proxy => [ qw/notes/ ] }, ); -__PACKAGE__->add_relationship('like_has_many', 'DBSchema::Result::Twokeys', { 'foreign.dvd_name' => 'self.name' }, { accessor_name => 'like_has_many' } ); +__PACKAGE__->add_relationship('like_has_many', 'DBSchema::Result::Twokeys', { 'foreign.dvd_name' => 'self.name' }, { accessor => 'multi', accessor_name => 'like_has_many' } ); __PACKAGE__->add_relationship('like_has_many2', 'DBSchema::Result::Twokeys_belongsto', { 'foreign.key1' => 'self.twokeysfk' }, + { accessor => 'multi' }, ); 1; diff --git a/t/lib/DBSchema/Result/Twokeys.pm b/t/lib/DBSchema/Result/Twokeys.pm index 7d71d01..ee9f15e 100644 --- a/t/lib/DBSchema/Result/Twokeys.pm +++ b/t/lib/DBSchema/Result/Twokeys.pm @@ -15,7 +15,7 @@ __PACKAGE__->add_columns( ); __PACKAGE__->set_primary_key("dvd_name", "key2"); -__PACKAGE__->add_relationship('like_belongs_to', 'DBSchema::Result::Dvd', { 'foreign.name' => 'self.dvd_name' }, ); +__PACKAGE__->add_relationship('like_belongs_to', 'DBSchema::Result::Dvd', { 'foreign.name' => 'self.dvd_name' }, { accessor => 'single' }); 1; -- 2.45.2