From b6c034fbe570d28c4edbed64d13e02909bc16b8b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 13 Feb 2025 09:44:45 +0000 Subject: [PATCH] Bug 38924: Add issue and old_issue relations to Schema --- Koha/Schema/Result/Issue.pm | 15 +------------- Koha/Schema/Result/PatronQuotaUsage.pm | 27 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index ea9ceec094..b0518ca477 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -434,23 +434,10 @@ Related object: L =cut __PACKAGE__->has_many( - 'quota_usages' => 'MyApp::Schema::Result::PatronQuotaUsage', + 'quota_usages' => 'Koha::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. diff --git a/Koha/Schema/Result/PatronQuotaUsage.pm b/Koha/Schema/Result/PatronQuotaUsage.pm index 300458bfef..15300a1823 100644 --- a/Koha/Schema/Result/PatronQuotaUsage.pm +++ b/Koha/Schema/Result/PatronQuotaUsage.pm @@ -145,6 +145,33 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-08-21 16:54:49 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:x+OvLQNInT0DkfPmiZwZzg +=head2 issue + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + issue => 'Koha::Schema::Result::Issue', + 'issue_id', + { join_type => 'left' } +); + +=head2 old_issue + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + old_issue => 'Koha::Schema::Result::OldIssue', + 'issue_id', + { join_type => 'left' } +); sub koha_object_class { return 'Koha::Patron::Quota::Usage'; -- 2.50.1