]> git.koha-community.org Git - koha.git/commit
Bug 22701: Make items prefetchable from Koha::Biblio
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 22 Apr 2019 13:08:41 +0000 (10:08 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 24 Apr 2019 10:56:33 +0000 (10:56 +0000)
commit95e074414758c84800281e410cabd258b1d4741d
tree9a135c26f8b750ddea01f1e0f3de4e5bf596156b
parent6416ead3cb5f992146822f7de6b242a814d1a1be
Bug 22701: Make items prefetchable from Koha::Biblio

This patch makes Koha::Biblio->items use _new_from_dbic instead of
calling Koha::Items->search. This allows calling it with prefetch
enabled for the items relationship. No noticeable behaviour change takes
place besides this.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass!
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests still pass!
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/Biblio.pm