[Koha-bugs] [Bug 16965] Add the Koha::Objects->search_related method

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Oct 19 12:27:00 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16965

--- Comment #29 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 56651
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56651&action=edit
[PASSED QA] Bug 16965: search_related returns an instanciated
Koha::Objects-based object

Koha::Objects->search_related should return a Koha::Objects-based
object.
This search_related method should follow the same rules as the search
method, i.e. take into account what the caller want (scalar or list).
The problem here is that we do not know (in Koha::Objects) what is the
kind of objects we want to instanciate. To know it, this patch adds a
get_object_class, it will return the class of the object and the
resultset Koha::Object-based object.

The drawback of this method is that we will have to keep it up-to-date
every time we add a new Koha::Object class.

Signed-off-by: Marc Véron <veron at veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list