Browse Source
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@veron.ch> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>16.11.x
2 changed files with 38 additions and 4 deletions
Loading…
Reference in new issue