Created attachment 60104 [details] [review] Bug 18093: Add Koha::Objects->get_column Test plan: prove t/db_dependent/Koha/Objects.t Should return green
Created attachment 60115 [details] [review] Bug 18093: Add Koha::Objects->get_column Test plan: prove t/db_dependent/Koha/Objects.t Should return green Followed test plan, result as expected Signed-off-by: Marc Véron <veron@veron.ch>
This method now returns a DBIx::Class::ResultSetColumn object. I am wondering if we should do that. It seems not to fit in the current design of Koha::Object[s]. Maybe you need to elaborate first on how we are going to use this method first ?
I wanted to add a follow-up for something but finally did not need it. It is not important for now, but we may need it later.
(In reply to Jonathan Druart from comment #4) > I wanted to add a follow-up for something but finally did not need it. > It is not important for now, but we may need it later. How would you use it? Koha Objects more-or-less encapsulate DBIx, but here you do not. Would returning an array of values be enough?
Created attachment 61154 [details] [review] Bug 18093: Koha::Objects->get_column should not return a DBIC object
(In reply to Marcel de Rooy from comment #5) > (In reply to Jonathan Druart from comment #4) > > I wanted to add a follow-up for something but finally did not need it. > > It is not important for now, but we may need it later. > > How would you use it? I would have used it how I did in the test. > Koha Objects more-or-less encapsulate DBIx, but here you do not. > Would returning an array of values be enough? Do you think it's better with this second patch?
Created attachment 61155 [details] [review] Bug 18093: Add Koha::Objects->get_column Test plan: prove t/db_dependent/Koha/Objects.t Should return green Followed test plan, result as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 61156 [details] [review] Bug 18093: Koha::Objects->get_column should not return a DBIC object Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 17.05, thanks Jonathan!
This won't get ported back to 16.11.x as it is an enhancement.