]> git.koha-community.org Git - koha.git/commit
Bug 24321: Make objects.search use mappings from Koha::Object(s)
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 31 Dec 2019 13:23:44 +0000 (10:23 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 8 Jan 2020 14:42:17 +0000 (14:42 +0000)
commitee14689d5151838d62b244b5cae721fac2109c2a
tree211c9422a52d431e007dc45f72f2d668a4ed2085
parent451e7dacd2df7ac731c4a721c1f6c6ab4602719d
Bug 24321: Make objects.search use mappings from Koha::Object(s)

This patch simplifies the objects.search helper so it relies entirely on
the result set object for the attribute mappings.

The result is no more to_api or to_model mappings are passed. The
controllers need to be cleaned up after this patch.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Note: the original version of this helpers accepted arbitrary mappings
and are now constrianed to real mappings on the Koha::Object level. As
such, the number of tests got reduced.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/REST/Plugin/Objects.pm
t/db_dependent/Koha/REST/Plugin/Objects.t