From 0d1f8f09636bc117bd5b77d99db2546dfa16ddaf Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 11 Mar 2022 14:05:48 +0000 Subject: [PATCH] Bug 30275: Add 'renewals' relation to Issue Schema Signed-off-by: Owen Leonard Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/Issue.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index 0ab760fad4..44debc944b 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -373,6 +373,21 @@ __PACKAGE__->belongs_to( }, ); +=head2 renewals + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "renewals", + "Koha::Schema::Result::CheckoutRenewal", + { "foreign.issue_id" => "self.issue_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 return_claim Type: might_have -- 2.39.5