fixing COPY create method since fieldmapper only has "Essential" columns from CDBI now
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Feb 2006 02:44:09 +0000 (02:44 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Feb 2006 02:44:09 +0000 (02:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3126 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI.pm
Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/storage.pm

index ad9cdad..657d96e 100644 (file)
@@ -83,7 +83,7 @@ sub fast_flesh_sth {
        }
 
        my $fm_class = 'Fieldmapper::'.$class;
-       my $field_list = join ',', $class->columns('All');
+       my $field_list = join ',', $class->columns('Essential');
        
        my $sth;
        if (!$like) {
@@ -260,7 +260,7 @@ sub create_from_fieldmapper {
                my %hash = map { defined $fm->$_ ?
                                        ($_ => $fm->$_) :
                                        ()
-                               } grep { $_ ne $primary } $class->columns('All');
+                               } grep { $_ ne $primary } $class->columns('Essential');
 
                if ($class->find_column( 'last_xact_id' )) {
                        my $xact_id = $class->current_xact_id;
@@ -386,7 +386,7 @@ sub modify_from_fieldmapper {
                %hash = map { defined $fm->$_ ?
                                ($_ => ''.$fm->$_) :
                                ()
-                       } grep { $_ ne $primary } $class->columns('All');
+                       } grep { $_ ne $primary } $class->columns('Essential');
        } else {
                %hash = %{$fm};
        }
index 8b19a51..58199ec 100644 (file)
 
                my $pri = $cdbi->columns('Primary');
 
-               my @cols = grep {$_ ne $pri} $cdbi->columns('All');
+               my @cols = grep {$_ ne $pri} $cdbi->columns('Essential');
 
                my $col_list = join ',', @cols;