]> git.koha-community.org Git - koha.git/commit
Bug 24191: Make objects.search pass to_model to dbic_merge_sorting
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 9 Dec 2019 18:31:36 +0000 (15:31 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 10 Dec 2019 16:17:27 +0000 (16:17 +0000)
commitea7311fedfc8e3e031b4f387c148b158b82e5db0
treed013540daeaa52c6a915279003d4ae1f73d4dff7
parent741b9a1c73ce366b02016a8bc80b5c01d5712c07
Bug 24191: Make objects.search pass to_model to dbic_merge_sorting

This patch makes objects.search pass the to_mode method reference so it
can be used to map API attributes to column names when building the
sorting portion of the query.

To test:
1. Apply the regression tests on this patchset
2. Run:
  $ kshell
 k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Tests fail!
3. Apply the rest of the patchset
4. Run:
 k$ prove t/Koha/REST/Plugin/Query.t
=> SUCCESS: Tests pass! changes to the methods work as expected!
5. Run:
 k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
6. Sign off :-D

Sponsored-by: ByWater Solutions
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/REST/Plugin/Objects.pm