related_resultset is in the known_methods array and as such is allowed to be called via any existing Koha::Object result. This method is untested (I thought all methods being passed through required full testing koha side.. at least that's what I had been lead to beleive). This method returns a DBIx::Class::ResultSet and not a Koha::Objects result class and as such introduces inconsistent behaviour.. we should have it remain consistent and have a localised method to convert the result to a Koha::Object derived class.. Personally, one of my biggest disappointments with Koha::Objects is that we don't get the relationship accessors provided by DBIx::Class
Created attachment 83432 [details] [review] Bug 22033: Remove related_resultset from the list of available methods It is not covered by tests.
It is a mistake, it should not be there.
Created attachment 83441 [details] [review] Bug 22033: Remove related_resultset from the list of available methods It is not covered by tests. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Trivial patch, going straight for PQA
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.02. I chose to backport this to the 18.11.x as we're early in the cycle. I don't feel it's required for earlier releases however as it's a precautionary measure to prevent it's misuse in future developments. Marking RESOLVED FIXED