From 8958094801fda86643aee19a87de573c670c158f Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Wed, 28 Dec 2016 14:43:34 -0500 Subject: [PATCH] LP#1655149: Badges need CDBI support for location groups The badge code needs to inspect copy location groups, and tries to do so using Class::DBI classes. But we haven't told CDBI about aclg and friends. Here we tell Class::DBI about asset.copy_location_group so that storage can retrieve directly. Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- .../lib/OpenILS/Application/Storage/CDBI/asset.pm | 8 ++++++++ .../lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm index b9f6354de7..b631bb865d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm @@ -12,6 +12,14 @@ __PACKAGE__->table( 'asset_copy_location' ); __PACKAGE__->columns( Primary => qw/id/ ); __PACKAGE__->columns( Essential => qw/name owning_lib holdable hold_verify opac_visible circulate label_prefix label_suffix checkin_alert deleted/ ); +#------------------------------------------------------------------------------- +package asset::copy_location_group; +use base qw/asset/; + +__PACKAGE__->table( 'asset_copy_location_group' ); +__PACKAGE__->columns( Primary => qw/id/ ); +__PACKAGE__->columns( Essential => qw/name owner pos top opac_visible/ ); + #------------------------------------------------------------------------------- package asset::copy_location_order; use base qw/asset/; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm index 59f72f5c6d..f680b1c9d1 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/dbi.pm @@ -375,6 +375,12 @@ asset::copy_location->table( 'asset.copy_location' ); asset::copy_location->sequence( 'asset.copy_location_id_seq' ); + #--------------------------------------------------------------------- + package asset::copy_location_group; + + asset::copy_location_group->table( 'asset.copy_location_group' ); + asset::copy_location_group->sequence( 'asset.copy_location_group_id_seq' ); + #--------------------------------------------------------------------- package asset::copy; -- 2.43.2