From 7e609e27fe1368c085d1367c16b9f6433d0cb555 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 7 Feb 2025 12:11:52 +0000 Subject: [PATCH] Bug 38924: Add relations after the hash in DBIC This adds additional relations to our DBIC classes to allow relation traversal in our Koha::Objects Rebased-by: Victor Grousset/tuxayo --- Koha/Schema/Result/Issue.pm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index f71dd50882..ea9ceec094 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -425,6 +425,32 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 quota_usages + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + 'quota_usages' => 'MyApp::Schema::Result::PatronQuotaUsage', + 'issue_id' +); + +=head2 quotas + +Type: many_to_many + +Related object: L + +=cut + +__PACKAGE__->many_to_many( + 'patron_quotas' => 'patron_quota_usages', + 'patron_quota' +); + =head2 koha_object_class Missing POD for koha_object_class. -- 2.50.1