add_relationship without the accessor attribute is invalid
authorAlexander Hartmaier <alexander.hartmaier@t-systems.at>
Mon, 4 Oct 2010 15:24:22 +0000 (17:24 +0200)
committerAlexander Hartmaier <alexander.hartmaier@t-systems.at>
Mon, 4 Oct 2010 15:24:22 +0000 (17:24 +0200)
t/lib/DBSchema/Result/Dvd.pm
t/lib/DBSchema/Result/Twokeys.pm

index 0020109318b104d4a2b222c51bb3e78f02ce77f5..ba34eecc6c9c1ae98e761fe87f26658b92d68324 100644 (file)
@@ -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;
index 7d71d01dd9e1d6ae3db356cef318a27010386f7c..ee9f15ec75631f93776f68c53df3337f3a83100d 100644 (file)
@@ -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;
This page took 0.021212 seconds and 4 git commands to generate.