From e7f6179d1ef05e90eb034c9bb25a80b833497ea9 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 | 2 +- Koha/Schema/Result/PatronQuotaUsage.pm | 27 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index ea9ceec094..781a824340 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -434,7 +434,7 @@ Related object: L =cut __PACKAGE__->has_many( - 'quota_usages' => 'MyApp::Schema::Result::PatronQuotaUsage', + 'quota_usages' => 'Koha::Schema::Result::PatronQuotaUsage', 'issue_id' ); 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