From 21048ab9cd15c01d81b4d86605db46ec9ccc8aff Mon Sep 17 00:00:00 2001 From: Alexander Hartmaier Date: Tue, 5 Oct 2010 18:56:08 +0200 Subject: [PATCH] fixed belongs_to rels in Dvd --- t/lib/DBSchema/Result/Dvd.pm | 4 ++-- t/lib/DBSchema/Result/Twokeys.pm | 3 +-- t/lib/DBSchema/Result/Twokeys_belongsto.pm | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/t/lib/DBSchema/Result/Dvd.pm b/t/lib/DBSchema/Result/Dvd.pm index ba34eec..e9d6627 100644 --- a/t/lib/DBSchema/Result/Dvd.pm +++ b/t/lib/DBSchema/Result/Dvd.pm @@ -45,8 +45,8 @@ __PACKAGE__->add_columns( }, ); __PACKAGE__->set_primary_key('dvd_id'); -__PACKAGE__->belongs_to('owner', 'DBSchema::Result::User', { id => 'owner' }); -__PACKAGE__->belongs_to('current_borrower', 'DBSchema::Result::User', { id => 'current_borrower' }); +__PACKAGE__->belongs_to('owner', 'DBSchema::Result::User', 'owner'); +__PACKAGE__->belongs_to('current_borrower', 'DBSchema::Result::User', 'current_borrower'); __PACKAGE__->has_many('dvdtags', 'Dvdtag', { 'foreign.dvd' => 'self.dvd_id' }); __PACKAGE__->has_many('viewings', 'DBSchema::Result::Viewing', { 'foreign.dvd_id' => 'self.dvd_id' }); __PACKAGE__->many_to_many('tags', 'dvdtags' => 'tag'); diff --git a/t/lib/DBSchema/Result/Twokeys.pm b/t/lib/DBSchema/Result/Twokeys.pm index ee9f15e..ff27f92 100644 --- a/t/lib/DBSchema/Result/Twokeys.pm +++ b/t/lib/DBSchema/Result/Twokeys.pm @@ -18,5 +18,4 @@ __PACKAGE__->set_primary_key("dvd_name", "key2"); __PACKAGE__->add_relationship('like_belongs_to', 'DBSchema::Result::Dvd', { 'foreign.name' => 'self.dvd_name' }, { accessor => 'single' }); -1; - +1; \ No newline at end of file diff --git a/t/lib/DBSchema/Result/Twokeys_belongsto.pm b/t/lib/DBSchema/Result/Twokeys_belongsto.pm index 3f35aa0..4c5a8ae 100644 --- a/t/lib/DBSchema/Result/Twokeys_belongsto.pm +++ b/t/lib/DBSchema/Result/Twokeys_belongsto.pm @@ -20,5 +20,4 @@ __PACKAGE__->add_relationship('like_belongs_to', 'DBSchema::Result::Dvd', { 'for __PACKAGE__->belongs_to('onekey', 'DBSchema::Result::Onekey', { 'foreign.id' => 'self.key1' }, ); -1; - +1; \ No newline at end of file -- 2.45.2