[open-ils-commits] r11942 - trunk/Open-ILS/src/perlmods/OpenILS/Utils
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 23 20:48:42 EST 2009
Author: miker
Date: 2009-01-23 20:48:41 -0500 (Fri, 23 Jan 2009)
New Revision: 11942
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm
Log:
add links to the fm class structure
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm 2009-01-23 23:33:07 UTC (rev 11941)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Utils/Fieldmapper.pm 2009-01-24 01:48:41 UTC (rev 11942)
@@ -47,7 +47,8 @@
# 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};
+ #my $idl = XMLin( $file, ForceArray => 0, KeyAttr => ['name', 'id'], ValueAttr => {link =>'key'} )->{class};
+ my $idl = XMLin( $file, ForceArray => 0, KeyAttr => ['name', 'id', 'field'] )->{class};
for my $c ( keys %$idl ) {
next unless ($idl->{$c}{'oils_obj:fieldmapper'});
@@ -71,6 +72,13 @@
$$fieldmap{$n}{selector} = $idl->{$c}{fields}{field}{$f}{'reporter:selector'};
}
}
+ for my $f ( keys %{ $idl->{$c}{links}{link} } ) {
+ $$fieldmap{$n}{links}{$f} =
+ { class => $idl->{$c}{links}{link}{$f}{class},
+ reltype => $idl->{$c}{links}{link}{$f}{reltype},
+ key => $idl->{$c}{links}{link}{$f}{key},
+ };
+ }
}
More information about the open-ils-commits
mailing list