From 1736e86de6a082e17c94f14980c328d5da7e40f0 Mon Sep 17 00:00:00 2001
From: Nick Clemens <nick@bywatersolutions.com>
Date: Thu, 28 Apr 2022 17:54:48 +0000
Subject: [PATCH] Bug 24857: Add object classes to Schema

---
 Koha/Schema/Result/ItemGroup.pm     | 7 ++++++-
 Koha/Schema/Result/ItemGroupItem.pm | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Koha/Schema/Result/ItemGroup.pm b/Koha/Schema/Result/ItemGroup.pm
index 2121d085bf..aff4d47118 100644
--- a/Koha/Schema/Result/ItemGroup.pm
+++ b/Koha/Schema/Result/ItemGroup.pm
@@ -151,6 +151,11 @@ __PACKAGE__->has_many(
 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-28 15:52:48
 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xxuumXVFEbkVB0sFFlO5og
 
+sub koha_objects_class {
+    'Koha::Biblio::ItemGroups';
+}
+sub koha_object_class {
+    'Koha::Biblio::ItemGroup';
+}
 
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
 1;
diff --git a/Koha/Schema/Result/ItemGroupItem.pm b/Koha/Schema/Result/ItemGroupItem.pm
index 57a4f2776e..c67f844775 100644
--- a/Koha/Schema/Result/ItemGroupItem.pm
+++ b/Koha/Schema/Result/ItemGroupItem.pm
@@ -132,6 +132,11 @@ __PACKAGE__->belongs_to(
 # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-28 15:52:48
 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LxAamW450isCEfygq7dYDg
 
+sub koha_object_class {
+    'Koha::Biblio::ItemGroup::Item';
+}
+sub koha_objects_class {
+    'Koha::Biblio::ItemGroup::Items';
+}
 
-# You can replace this text with custom code or comments, and it will be preserved on regeneration
 1;
-- 
2.30.2