From 44cd6841fa3e0f4edac5e0338ea7d2bc69ef1e0e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 12 Oct 2015 10:40:46 +0100 Subject: [PATCH] Bug 14544: Add missing biblio <=> biblioitems <=> items relationships to the schema Signed-off-by: Marcel de Rooy Adjusted by a follow-up. Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/Biblioitem.pm | 3 ++- Koha/Schema/Result/Item.pm | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Koha/Schema/Result/Biblioitem.pm b/Koha/Schema/Result/Biblioitem.pm index 874f1d2a68..d34b2ef008 100644 --- a/Koha/Schema/Result/Biblioitem.pm +++ b/Koha/Schema/Result/Biblioitem.pm @@ -344,6 +344,7 @@ __PACKAGE__->has_many( # Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-02-24 14:19:57 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A/4lKYlKWWd8TcMVzMRtCg +__PACKAGE__->belongs_to( biblio => "Koha::Schema::Result::Biblio", "biblionumber" ); +__PACKAGE__->belongs_to( items => "Koha::Schema::Result::Item", "biblioitemnumber" ); -# You can replace this text with custom content, and it will be preserved on regeneration 1; diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index 08031b2c31..806a2bff5b 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -619,6 +619,8 @@ __PACKAGE__->might_have( # Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-11-04 12:00:58 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jkgJfulDrGaUpQ6jC40vpQ +__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); + sub effective_itemtype { my ( $self ) = @_; -- 2.39.5