[open-ils-commits] r19808 - in branches/rel_2_1/Open-ILS: examples src/perlmods/lib/OpenILS/Utils (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 18 12:52:03 EDT 2011
Author: erickson
Date: 2011-03-18 12:52:00 -0400 (Fri, 18 Mar 2011)
New Revision: 19808
Modified:
branches/rel_2_1/Open-ILS/examples/fm_IDL.xml
branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm
Log:
added field_safe attr to ccs, aout, and crahp classes; capture field_safe attr during IDL parsing
Modified: branches/rel_2_1/Open-ILS/examples/fm_IDL.xml
===================================================================
--- branches/rel_2_1/Open-ILS/examples/fm_IDL.xml 2011-03-18 16:51:20 UTC (rev 19807)
+++ branches/rel_2_1/Open-ILS/examples/fm_IDL.xml 2011-03-18 16:52:00 UTC (rev 19808)
@@ -2568,7 +2568,7 @@
</actions>
</permacrud>
</class>
- <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status">
+ <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status" oils_persist:field_safe="true">
<fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
<field name="holdable" reporter:datatype="bool"/>
<field name="id" reporter:selector="name" reporter:datatype="id"/>
@@ -4330,7 +4330,7 @@
<link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
</links>
</class>
- <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type">
+ <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type" oils_persist:field_safe="true">
<fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
<field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
<field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
@@ -4757,7 +4757,7 @@
</permacrud>
</class>
- <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule">
+ <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule" oils_persist:field_safe="true">
<fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
<field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
<field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
Modified: branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm
===================================================================
--- branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm 2011-03-18 16:51:20 UTC (rev 19807)
+++ branches/rel_2_1/Open-ILS/src/perlmods/lib/OpenILS/Utils/Fieldmapper.pm 2011-03-18 16:52:00 UTC (rev 19808)
@@ -160,6 +160,7 @@
$tablename = '';
}
my $restrict_primary = get_attribute( $attribute_list, 'oils_persist:restrict_primary' );
+ my $field_safe = get_attribute( $attribute_list, 'oils_persist:field_safe' );
# Load the attributes into the Fieldmapper --------------------
@@ -170,6 +171,7 @@
$$fieldmap{$fm}{ table } = $tablename;
$$fieldmap{$fm}{ controller } = [ split ' ', $controller ];
$$fieldmap{$fm}{ restrict_primary } = $restrict_primary;
+ $$fieldmap{$fm}{ field_safe } = $field_safe;
# Load fields and links
More information about the open-ils-commits
mailing list