Our coding guidelines are not quite precise regarding this, but in order to make accessors for related objects embeddable/searchable on the REST API, the relationships should share the name with the method, as the 'sub biblio' example in the guidelines: https://wiki.koha-community.org/wiki/Coding_Guidelines#Koha::Object.28s.29
Created attachment 131670 [details] [review] Bug 30294: Rename Koha::Recall->* used relationship names This patch renames the underlaying relationship names used in the 'patron' and 'library' subs so they are more clearly prefetchable and also enabling them to be embeddable and searchable through an eventual API route for recalls. To test: 1. Apply the patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Recall* => SUCCESS: Tests pass, nothing really changes 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 131854 [details] [review] Bug 30294: Rename Koha::Recall->* used relationship names This patch renames the underlaying relationship names used in the 'patron' and 'library' subs so they are more clearly prefetchable and also enabling them to be embeddable and searchable through an eventual API route for recalls. To test: 1. Apply the patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Recall* => SUCCESS: Tests pass, nothing really changes 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Created attachment 131964 [details] [review] Bug 30294: Rename Koha::Recall->* used relationship names This patch renames the underlaying relationship names used in the 'patron' and 'library' subs so they are more clearly prefetchable and also enabling them to be embeddable and searchable through an eventual API route for recalls. To test: 1. Apply the patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Recall* => SUCCESS: Tests pass, nothing really changes 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 22.05, thanks to everybody involved [U+1F984]