fixup to support SuperCat
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Feb 2006 04:28:51 +0000 (04:28 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 13 Feb 2006 04:28:51 +0000 (04:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3033 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/authority.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/biblio.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/container.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/money.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/permission.pm
Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm

index d5e4499..a30f789 100644 (file)
@@ -9,7 +9,8 @@ package authority::record_entry;
 use base qw/authority/;
 
 authority::record_entry->table( 'authority_record_entry' );
-authority::record_entry->columns( All => qw/id arn_source arn_value creator editor
+authority::record_entry->columns( Primary => qw/id/ );
+authority::record_entry->columns( Essential => qw/arn_source arn_value creator editor
                                      create_date edit_date source active
                                      deleted marc last_xact_id/ );
 
@@ -18,7 +19,8 @@ package authority::record_note;
 use base qw/authority/;
 
 authority::record_note->table( 'authority_record_note' );
-authority::record_note->columns( All => qw/id record value creator
+authority::record_note->columns( Primary => qw/id/ );
+authority::record_note->columns( Essential => qw/record value creator
                                        editor create_date edit_date/ );
 #-------------------------------------------------------------------------------
 package authority::full_rec;
index 43b26a0..0a2e4c8 100644 (file)
@@ -9,7 +9,7 @@ package biblio::record_entry;
 use base qw/biblio/;
 
 biblio::record_entry->table( 'biblio_record_entry' );
-biblio::record_entry->columns( All => qw/id tcn_source tcn_value creator editor
+biblio::record_entry->columns( Essential => qw/id tcn_source tcn_value creator editor
                                      create_date edit_date source active
                                      deleted marc last_xact_id fingerprint/ );
 
@@ -18,7 +18,7 @@ package biblio::record_note;
 use base qw/biblio/;
 
 biblio::record_note->table( 'biblio_record_note' );
-biblio::record_note->columns( All => qw/id record value creator
+biblio::record_note->columns( Essential => qw/id record value creator
                                        editor create_date edit_date/ );
 #-------------------------------------------------------------------------------
 
index 206f64e..c26d7ae 100644 (file)
@@ -9,56 +9,64 @@ package container::user_bucket;
 use base qw/container/;
 
 container::user_bucket->table( 'container_user_bucket' );
-container::user_bucket->columns( All => qw/id owner name btype pub/ );
+container::user_bucket->columns( Primary => qw/id/ );
+container::user_bucket->columns( Essential => qw/owner name btype pub/ );
 
 #-------------------------------------------------------------------------------
 package container::user_bucket_item;
 use base qw/container/;
 
 container::user_bucket_item->table( 'container_user_bucket_item' );
-container::user_bucket_item->columns( All => qw/id bucket target_user/ );
+container::user_bucket_item->columns( Primary => qw/id/ );
+container::user_bucket_item->columns( Essential => qw/bucket target_user/ );
 
 #-------------------------------------------------------------------------------
 package container::copy_bucket;
 use base qw/container/;
 
 container::copy_bucket->table( 'container_copy_bucket' );
-container::copy_bucket->columns( All => qw/id owner name btype pub/ );
+container::copy_bucket->columns( Primary => qw/id/ );
+container::copy_bucket->columns( Essential => qw/owner name btype pub/ );
 
 #-------------------------------------------------------------------------------
 package container::copy_bucket_item;
 use base qw/container/;
 
 container::copy_bucket_item->table( 'container_copy_bucket_item' );
-container::copy_bucket_item->columns( All => qw/id bucket target_copy/ );
+container::copy_bucket_item->columns( Primary => qw/id/ );
+container::copy_bucket_item->columns( Essential => qw/bucket target_copy/ );
 
 #-------------------------------------------------------------------------------
 package container::biblio_record_entry_bucket;
 use base qw/container/;
 
 container::biblio_record_entry_bucket->table( 'container_biblio_record_entry_bucket' );
-container::biblio_record_entry_bucket->columns( All => qw/id owner name btype pub/ );
+container::biblio_record_entry_bucket->columns( Primary => qw/id/ );
+container::biblio_record_entry_bucket->columns( Essential => qw/owner name btype pub/ );
 
 #-------------------------------------------------------------------------------
 package container::biblio_record_entry_bucket_item;
 use base qw/container/;
 
 container::biblio_record_entry_bucket_item->table( 'container_biblio_record_entry_bucket_item' );
-container::biblio_record_entry_bucket_item->columns( All => qw/id bucket target_biblio_record_entry/ );
+container::biblio_record_entry_bucket_item->columns( Primary => qw/id/ );
+container::biblio_record_entry_bucket_item->columns( Essential => qw/bucket target_biblio_record_entry/ );
 
 #-------------------------------------------------------------------------------
 package container::call_number_bucket;
 use base qw/container/;
 
 container::call_number_bucket->table( 'container_call_number_bucket' );
-container::call_number_bucket->columns( All => qw/id owner name btype pub/ );
+container::call_number_bucket->columns( Primary => qw/id/ );
+container::call_number_bucket->columns( Essential => qw/owner name btype pub/ );
 
 #-------------------------------------------------------------------------------
 package container::call_number_bucket_item;
 use base qw/container/;
 
 container::call_number_bucket_item->table( 'container_call_number_bucket_item' );
-container::call_number_bucket_item->columns( All => qw/id bucket target_call_number/ );
+container::call_number_bucket_item->columns( Primary => qw/id/ );
+container::call_number_bucket_item->columns( Essential => qw/bucket target_call_number/ );
 
 
 1;
index d762eda..89ee447 100644 (file)
@@ -79,24 +79,21 @@ package money::payment;
 use base qw/money/;
 __PACKAGE__->table('money_payment');
 __PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/xact amount payment_ts payment_type/);
-__PACKAGE__->columns(Others => qw/note/);
+__PACKAGE__->columns(Essential => qw/xact amount payment_ts payment_type note/);
 #-------------------------------------------------------------------------------
 
 package money::cash_payment;
 use base qw/money/;
 __PACKAGE__->table('money_cash_payment');
 __PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected/);
-__PACKAGE__->columns(Others => qw/note/);
+__PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer accepting_usr amount_collected note/);
 #-------------------------------------------------------------------------------
 
 package money::check_payment;
 use base qw/money/;
 __PACKAGE__->table('money_check_payment');
 __PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected/);
-__PACKAGE__->columns(Others => qw/note/);
+__PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer check_number accepting_usr amount_collected note/);
 #-------------------------------------------------------------------------------
 
 package money::credit_card_payment;
@@ -106,16 +103,14 @@ __PACKAGE__->columns(Primary => 'id');
 __PACKAGE__->columns(Essential => qw/xact amount payment_ts cash_drawer
                                     accepting_usr amount_collected cc_type
                                     cc_number expire_month expire_year
-                                    approval_code/);
-__PACKAGE__->columns(Others => 'note');
+                                    approval_code note/);
 #-------------------------------------------------------------------------------
 
 package money::forgive_payment;
 use base qw/money/;
 __PACKAGE__->table('money_forgive_payment');
 __PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected/);
-__PACKAGE__->columns(Others => qw/note/);
+__PACKAGE__->columns(Essential => qw/xact amount payment_ts accepting_usr amount_collected note/);
 #-------------------------------------------------------------------------------
 
 package money::work_payment;
index fa856a1..8f801cc 100644 (file)
@@ -8,27 +8,32 @@ use base qw/OpenILS::Application::Storage::CDBI/;
 package permission::perm_list;
 use base qw/permission/;
 __PACKAGE__->table('permission_perm_list');
-__PACKAGE__->columns(All => qw/id code description/);
+__PACKAGE__->columns(Primary => qw/id/);
+__PACKAGE__->columns(Essential => qw/code description/);
 #-------------------------------------------------------------------------------
 package permission::grp_tree;
 use base qw/permission/;
 __PACKAGE__->table('permission_grp_tree');
-__PACKAGE__->columns(All => qw/id name parent description/);
+__PACKAGE__->columns(Primary => qw/id/);
+__PACKAGE__->columns(Essential => qw/name parent description/);
 #-------------------------------------------------------------------------------
 package permission::usr_grp_map;
 use base qw/permission/;
 __PACKAGE__->table('permission_usr_grp_map');
-__PACKAGE__->columns(All => qw/id usr grp/);
+__PACKAGE__->columns(Primary => qw/id/);
+__PACKAGE__->columns(Essential => qw/usr grp/);
 #-------------------------------------------------------------------------------
 package permission::usr_perm_map;
 use base qw/permission/;
 __PACKAGE__->table('permission_usr_perm_map');
-__PACKAGE__->columns(All => qw/id usr perm depth grantable/);
+__PACKAGE__->columns(Primary => qw/id/);
+__PACKAGE__->columns(Essential => qw/usr perm depth grantable/);
 #-------------------------------------------------------------------------------
 package permission::grp_perm_map;
 use base qw/permission/;
 __PACKAGE__->table('permission_grp_perm_map');
-__PACKAGE__->columns(All => qw/id grp perm depth grantable/);
+__PACKAGE__->columns(Primary => qw/id/);
+__PACKAGE__->columns(Essential => qw/grp perm depth grantable/);
 #-------------------------------------------------------------------------------
 1;
 
index d53ab90..12df3b9 100644 (file)
@@ -272,7 +272,7 @@ sub _init {
 
                unless ( $$fieldmap{$pkg}{virtual} ) {
                        $$fieldmap{$pkg}{cdbi} = $cdbi;
-                       for my $col ( sort $cdbi->columns('All') ) {
+                       for my $col ( sort $cdbi->columns('Essential') ) {
                                $$fieldmap{$pkg}{fields}{$col} = { position => $pos, virtual => 0 };
                                $pos++;
                        }