From 56f0e392d13f014f744239c0306d3ee87fb942c9 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 16 Oct 2015 09:09:17 +0200 Subject: [PATCH] Bug 14544: [QA Follow-up] DBIx::Class changes One of the follow-ups added a belongs_to from Biblioitem to Item just as biblioitemnumber was a foreign key to Item. The relation goes the other way. As a temporary measure, I added set_primary_key in the local section of Virtualshelfcontent. Should be moved later with a real db rev. Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/Biblioitem.pm | 1 - Koha/Schema/Result/Virtualshelfcontent.pm | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Koha/Schema/Result/Biblioitem.pm b/Koha/Schema/Result/Biblioitem.pm index d34b2ef008..a9b926ac75 100644 --- a/Koha/Schema/Result/Biblioitem.pm +++ b/Koha/Schema/Result/Biblioitem.pm @@ -345,6 +345,5 @@ __PACKAGE__->has_many( # 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" ); 1; diff --git a/Koha/Schema/Result/Virtualshelfcontent.pm b/Koha/Schema/Result/Virtualshelfcontent.pm index 906a058e28..a8ad19d4b0 100644 --- a/Koha/Schema/Result/Virtualshelfcontent.pm +++ b/Koha/Schema/Result/Virtualshelfcontent.pm @@ -141,6 +141,8 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ie3Gx+/HthZQ/4fHjcPF0w +#TODO See BZ 14544: Should be resolved by db revision +__PACKAGE__->set_primary_key("shelfnumber","biblionumber"); # You can replace this text with custom content, and it will be preserved on regeneration 1; -- 2.39.5