From: Mike Rylander Date: Fri, 24 Jun 2011 18:53:50 +0000 (-0400) Subject: Add Class::DBI linking for monograph parts (and some for conjoined items AKA peer... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2dc603fc4f94920181dbb48f81792f923f22c129;p=evergreen%2Fmasslnc.git Add Class::DBI linking for monograph parts (and some for conjoined items AKA peer bibs) Signed-off-by: Mike Rylander Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm index 4cec39f8f3..1bf550d74d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI.pm @@ -506,6 +506,15 @@ sub modify_from_fieldmapper { action::survey_answer->has_a( question => 'action::survey_question' ); + biblio::peer_bib_copy_map->has_a( target_copy => 'asset::copy' ); + biblio::peer_bib_copy_map->has_a( peer_record => 'biblio::record_entry' ); + biblio::peer_bib_copy_map->has_a( peer_type => 'biblio::peer_type' ); + + asset::copy_part_map->has_a( target_copy => 'asset::copy' ); + asset::copy_part_map->has_a( part => 'biblio::monograph_part' ); + + biblio::peer_type->has_many( records => 'biblio::record_entry' ); + asset::copy_note->has_a( owning_copy => 'asset::copy' ); asset::copy_note->has_a( creator => 'actor::user' ); @@ -514,6 +523,9 @@ sub modify_from_fieldmapper { asset::copy->has_many( stat_cat_entries => [ 'asset::stat_cat_entry_copy_map' => 'stat_cat_entry' ] ); asset::copy->has_many( stat_cat_entry_copy_maps => 'asset::stat_cat_entry_copy_map' ); + asset::copy->has_many( peer_bib_copy_maps => 'biblio::peer_bib_copy_map' ); + + asset::copy->has_many( part_maps => 'asset::copy_part_map' ); asset::copy->has_a( call_number => 'asset::call_number' ); asset::copy->has_a( creator => 'actor::user' ); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm index 7780cbcb6a..44dbd4a892 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/biblio.pm @@ -31,11 +31,11 @@ biblio::peer_type->columns( Essential => qw/id name/ ); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- -package biblio::peer_record_copy_map; +package biblio::peer_bib_copy_map; use base qw/biblio/; -biblio::peer_record_copy_map->table( 'biblio_peer_record_copy_map' ); -biblio::peer_record_copy_map->columns( Essential => qw/id peer_type peer_record target_copy/ ); +biblio::peer_bib_copy_map->table( 'biblio_peer_bib_copy_map' ); +biblio::peer_bib_copy_map->columns( Essential => qw/id peer_type peer_bib target_copy/ ); #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- 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 5c6990ff22..ae9bfda056 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 @@ -4,6 +4,7 @@ package asset::copy_part_map; asset::copy_part_map->table( 'asset.copy_part_map' ); + asset::copy_part_map->sequence( 'asset.copy_part_map_id_seq' ); #------------------------------------------------------------------------------- package biblio::monograph_part; @@ -12,10 +13,10 @@ biblio::monograph_part->sequence( 'biblio.monograph_part_id_seq' ); #------------------------------------------------------------------------------- - package biblio::peer_record_copy_map; + package biblio::peer_bib_copy_map; - biblio::peer_record_copy_map->table( 'biblio.peer_record_copy_map' ); - biblio::peer_record_copy_map->sequence( 'biblio.peer_record_copy_map_id_seq' ); + biblio::peer_bib_copy_map->table( 'biblio.peer_bib_copy_map' ); + biblio::peer_bib_copy_map->sequence( 'biblio.peer_bib_copy_map_id_seq' ); #------------------------------------------------------------------------------- package biblio::peer_type;