Bugzilla – Attachment 123494 Details for
Bug 22690
Merging records with many items too slow (Elasticsearch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22690: (QA follow-up) Use relationship accessor
Bug-22690-QA-follow-up-Use-relationship-accessor.patch (text/plain), 1.21 KB, created by
Martin Renvoize (ashimema)
on 2021-08-05 13:29:27 UTC
(
hide
)
Description:
Bug 22690: (QA follow-up) Use relationship accessor
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-08-05 13:29:27 UTC
Size:
1.21 KB
patch
obsolete
>From ab4593d33151189d2ae928cbc42d01d62d4b2e67 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 22 Jul 2021 10:57:17 +0100 >Subject: [PATCH] Bug 22690: (QA follow-up) Use relationship accessor > >With the addition of foreign key relationships to the linktracker table >we now get a DBIC relationship accessor we can use. This clarifies the >code slightly by using the _result->relationship form to get the DBIC >resultset. We should still introduce a Koha::Object based class for >this table at some point. >--- > Koha/Item.pm | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index fdc13a90b9..c8b0d1cc91 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -1255,9 +1255,7 @@ sub move_to_biblio { > ); > > # linktrackers (there's no Koha object set available yet) >- # direct lookup as there's no foreign key relationship yet >- my $schema = Koha::Database->new()->schema(); >- my $linktrackers = $schema->resultset('Linktracker')->search({ itemnumber => $self->itemnumber }); >+ my $linktrackers = $self->_result->linktrackers; > $linktrackers->update_all({ biblionumber => $to_biblionumber }); > > return $to_biblionumber; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22690
:
90061
|
90115
|
90116
|
92828
|
94505
|
97696
|
98143
|
98210
|
98211
|
99376
|
99379
|
100316
|
104796
|
104797
|
104871
|
105445
|
106144
|
108777
|
109694
|
110991
|
110994
|
111196
|
111207
|
111236
|
111237
|
112100
|
112184
|
112567
|
112569
|
112754
|
113308
|
113309
|
113941
|
113942
|
113967
|
113968
|
118226
|
118227
|
118229
|
118231
|
118391
|
119433
|
119434
|
120820
|
120821
|
120852
|
120853
|
121389
|
121392
|
121474
|
121516
|
121517
|
121518
|
121519
|
121520
|
122846
|
122847
|
122848
|
122849
|
122850
|
122886
|
122887
|
122888
|
122889
|
122890
|
122936
|
122938
|
122939
|
123029
|
123030
|
123031
|
123032
|
123033
|
123034
|
123035
|
123036
|
123037
|
123038
|
123039
|
123040
|
123041
|
123042
|
123044
|
123062
|
123481
|
123482
|
123483
|
123484
|
123485
|
123486
|
123487
|
123488
|
123489
|
123490
|
123491
|
123492
|
123493
| 123494 |
123495
|
123496
|
123497
|
124176
|
124188
|
124257