[open-ils-commits] r11436 - trunk/Open-ILS/src/perlmods/OpenILS/Utils
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Dec 5 23:39:12 EST 2008
Author: miker
Date: 2008-12-05 23:39:09 -0500 (Fri, 05 Dec 2008)
New Revision: 11436
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm
Log:
quiet a needless but annoying warning
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm 2008-12-06 04:08:21 UTC (rev 11435)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm 2008-12-06 04:39:09 UTC (rev 11436)
@@ -45,9 +45,10 @@
return if (keys %$fieldmap);
return if (!OpenSRF::System->connected && !$args{IDL});
- # parse the IDL ...
- my $file = $args{IDL} || OpenSRF::Utils::SettingsClient->new->config_value( 'IDL' );
- my $idl = XMLin( $file, ForceArray => 0, KeyAttr => ['name', 'id'], ValueAttr => {link =>'key'} )->{class};
+ # parse the IDL ...
+ my $file = $args{IDL} || OpenSRF::Utils::SettingsClient->new->config_value( 'IDL' );
+ my $idl = XMLin( $file, ForceArray => 0, KeyAttr => ['name', 'id'], ValueAttr => {link =>'key'} )->{class};
+
for my $c ( keys %$idl ) {
next unless ($idl->{$c}{'oils_obj:fieldmapper'});
my $n = 'Fieldmapper::'.$idl->{$c}{'oils_obj:fieldmapper'};
@@ -55,7 +56,7 @@
$log->debug("Building Fieldmapper class for [$n] from IDL");
$$fieldmap{$n}{hint} = $c;
- $$fieldmap{$n}{virtual} = ($idl->{$c}{'oils_persist:virtual'} eq 'true') ? 1 : 0;
+ $$fieldmap{$n}{virtual} = ($idl->{$c}{'oils_persist:virtual'} && $idl->{$c}{'oils_persist:virtual'} eq 'true') ? 1 : 0;
$$fieldmap{$n}{table} = $idl->{$c}{'oils_persist:tablename'};
$$fieldmap{$n}{sequence} = $idl->{$c}{fields}{'oils_persist:sequence'};
$$fieldmap{$n}{identity} = $idl->{$c}{fields}{'oils_persist:primary'};
More information about the open-ils-commits
mailing list