From 4bd294d04d8b1d5fe23bfd901be06ef640c6fabc Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 19 Jul 2024 15:58:24 +0000 Subject: [PATCH] Bug 37389: Apply ExtendedAttributes Mixin to Patrons This restores the extended_attributes search query functionality as before, but with the new performance improvements --- Koha/Patrons.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Koha/Patrons.pm b/Koha/Patrons.pm index eb89573312..3f11d3d326 100644 --- a/Koha/Patrons.pm +++ b/Koha/Patrons.pm @@ -29,7 +29,7 @@ use Koha::Patron; use Koha::Exceptions::Patron; use Koha::Patron::Categories; -use base qw(Koha::Objects); +use base qw(Koha::Objects::Mixin::ExtendedAttributes Koha::Objects); =head1 NAME @@ -566,6 +566,18 @@ sub filter_by_have_permission { ); } +=head3 extended_attributes_config + +=cut + +sub extended_attributes_config { + return { + 'id_field' => 'borrowernumber', + 'key_field' => 'code', + 'schema_class' => 'Koha::Schema::Result::BorrowerAttribute', + }; +} + =head3 _type =cut -- 2.34.1