We agreed there needs to be consistency. This will be a blocker for dealing with related data from the API (prefetching, filternig, etC).
Created attachment 97628 [details] [review] Bug 24463: Add a basket_group relationship for baskets This patch aims to bring consistency between the accessor name and the underlying relationship to ease things when using it from the API. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Acquisition/Basket.t => SUCCESS: Tests pass! No behavior change! 3. Sign off :-D
Created attachment 98273 [details] [review] Bug 24463: Add a basket_group relationship for baskets This patch aims to bring consistency between the accessor name and the underlying relationship to ease things when using it from the API. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Acquisition/Basket.t => SUCCESS: Tests pass! No behavior change! 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com>
If we agree with such naming conventions (ie. create the rs when the DB column is poorly named), I think we should have a global plan, and do it widely. I do not think we should have 1 bug report per rs.
(In reply to Jonathan Druart from comment #3) > If we agree with such naming conventions (ie. create the rs when the DB > column is poorly named), I think we should have a global plan, and do it > widely. I do not think we should have 1 bug report per rs. I started adding them as needed on the bugs that will actually take advantage of it.
(In reply to Tomás Cohen Arazi from comment #4) > (In reply to Jonathan Druart from comment #3) > > If we agree with such naming conventions (ie. create the rs when the DB > > column is poorly named), I think we should have a global plan, and do it > > widely. I do not think we should have 1 bug report per rs. > > I started adding them as needed on the bugs that will actually take > advantage of it. But you don't, this bug report only renames the DBIC rs.
I see that this is the start of a tree of patches - Joubu, can we continue here?
Created attachment 101408 [details] [review] Bug 24463: Add a basket_group relationship for baskets This patch aims to bring consistency between the accessor name and the underlying relationship to ease things when using it from the API. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Acquisition/Basket.t => SUCCESS: Tests pass! No behavior change! 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Nice work everyone! Pushed to master for 20.05
enhancement not backported to 19.11.x