From e291e387eea7bd2a53722894035519bb8fb7f14b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 2 Mar 2022 13:23:35 +0000 Subject: [PATCH] Bug 19532: [DBIx] Schema change for Recalls Content-Type: text/plain; charset=utf-8 Separated from the "Recalls-objects-and-tests" patch Signed-off-by: Marcel de Rooy --- Koha/Schema/Result/Recall.pm | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Koha/Schema/Result/Recall.pm b/Koha/Schema/Result/Recall.pm index 56765c8c76..3918157da2 100644 --- a/Koha/Schema/Result/Recall.pm +++ b/Koha/Schema/Result/Recall.pm @@ -273,4 +273,42 @@ __PACKAGE__->add_columns( '+item_level_recall' => { is_boolean => 1 }, ); +__PACKAGE__->belongs_to( + "biblio", + "Koha::Schema::Result::Biblio", + { biblionumber => "biblionumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +__PACKAGE__->belongs_to( + "item", + "Koha::Schema::Result::Item", + { itemnumber => "itemnumber" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + +__PACKAGE__->belongs_to( + "borrower", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +__PACKAGE__->belongs_to( + "branch", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + 1; -- 2.20.1