From 7042020969ac16fdbe11ec5ed790b18e15b7a3cb Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Thu, 31 Aug 2017 12:19:47 +0100 Subject: [PATCH] Change LB Value to link to entity instead of user --- lib/Pear/LocalLoop/Schema/Result/LeaderboardValue.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Pear/LocalLoop/Schema/Result/LeaderboardValue.pm b/lib/Pear/LocalLoop/Schema/Result/LeaderboardValue.pm index 00833f4..7374246 100644 --- a/lib/Pear/LocalLoop/Schema/Result/LeaderboardValue.pm +++ b/lib/Pear/LocalLoop/Schema/Result/LeaderboardValue.pm @@ -13,7 +13,7 @@ __PACKAGE__->add_columns( is_auto_increment => 1, is_nullable => 0, }, - "user_id" => { + "entity_id" => { data_type => "integer", is_foreign_key => 1, is_nullable => 0, @@ -55,9 +55,9 @@ __PACKAGE__->belongs_to( ); __PACKAGE__->belongs_to( - "user", - "Pear::LocalLoop::Schema::Result::User", - { "foreign.id" => "self.user_id" }, + "entity", + "Pear::LocalLoop::Schema::Result::Entity", + { "foreign.id" => "self.entity_id" }, { is_deferrable => 0, join_type => "LEFT",