From a86f0063b592636b439c7c7c56d0c8436b8ac465 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 10 Mar 2020 15:56:15 -0300 Subject: [PATCH] Bug 20212: Add missing entries on schema files This patch adds the missing koha_object(s)_class methods to the related schema files. It also adds a 'bilbioitem' relationship to the Biblio class as required for being able to prefetch that table information. --- Koha/Schema/Result/ArticleRequest.pm | 1 - Koha/Schema/Result/Biblio.pm | 6 ++++++ Koha/Schema/Result/Subscription.pm | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Koha/Schema/Result/ArticleRequest.pm b/Koha/Schema/Result/ArticleRequest.pm index b787c91eca..11335e238f 100644 --- a/Koha/Schema/Result/ArticleRequest.pm +++ b/Koha/Schema/Result/ArticleRequest.pm @@ -260,6 +260,5 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-02 09:44:27 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Dhz1mVI7Z/6ibqaBZkPvUA - # You can replace this text with custom code or comments, and it will be preserved on regeneration 1; diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm index 806faf87ad..b98447751d 100644 --- a/Koha/Schema/Result/Biblio.pm +++ b/Koha/Schema/Result/Biblio.pm @@ -454,6 +454,12 @@ __PACKAGE__->has_many( # Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-17 09:15:51 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p2SIq565zPyE3ZUkSuXyBA +__PACKAGE__->has_many( + "biblioitem", + "Koha::Schema::Result::Biblioitem", + { "foreign.biblionumber" => "self.biblionumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); __PACKAGE__->has_one( "metadata", diff --git a/Koha/Schema/Result/Subscription.pm b/Koha/Schema/Result/Subscription.pm index a668b81fed..413cb8d956 100644 --- a/Koha/Schema/Result/Subscription.pm +++ b/Koha/Schema/Result/Subscription.pm @@ -520,5 +520,4 @@ __PACKAGE__->add_columns( '+closed' => { is_boolean => 1 }, ); -# You can replace this text with custom content, and it will be preserved on regeneration 1; -- 2.26.2