From 927db0f413e3e333242f5b4a20932cc4f100f116 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 --- Koha/Schema/Result/Issue.pm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index 1228c4df71f..011ac15ed78 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -455,12 +455,32 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 koha_object_class +=head2 quota_usages -Missing POD for koha_object_class. +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' +); + sub koha_object_class { 'Koha::Checkout'; } -- 2.39.5