refactored might_have rels; added tons of missing relationships
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Sep 2006 08:45:32 +0000 (08:45 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Sep 2006 08:45:32 +0000 (08:45 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5829 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/c-apps/oils_cstore.c

index f8847f4..0ae8663 100644 (file)
                        <field name="id" oils_obj:array_position="3" oils_persist:virtual="false" />
                        <field name="name" oils_obj:array_position="4" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="asvq" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question">
                <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
                        <field name="xact_type" oils_obj:array_position="16" oils_persist:virtual="false" />
                </fields>
                <links>
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                </links>
        </class>
        <class id="aun" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note">
                </fields>
                <links>
                        <link field="usr" reltype="has_a" key="id" map="" class="au"/>
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
                </links>
        </class>
        <class id="aus" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting">
                        <field name="value" oils_obj:array_position="6" oils_persist:virtual="false" />
                </fields>
                <links>
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                </links>
        </class>
        <class id="mafe" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry">
                        <field name="source" oils_obj:array_position="9" oils_persist:virtual="false" />
                        <field name="source_send_time" oils_obj:array_position="10" oils_persist:virtual="false" />
                        <field name="target_copy" oils_obj:array_position="11" oils_persist:virtual="false" />
+                       <field name="hold_transit_copy" oils_obj:array_position="12" oils_persist:virtual="false" />
                </fields>
                <links>
+                       <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
                        <link field="source" reltype="has_a" key="id" map="" class="aou"/>
                        <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
                        <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
+                       <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
                </links>
        </class>
        <class id="asvr" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response">
                        <field name="last_xact_id" oils_obj:array_position="12" oils_persist:virtual="false" />
                        <field name="marc" oils_obj:array_position="13" oils_persist:virtual="false" />
                        <field name="source" oils_obj:array_position="14" oils_persist:virtual="false" />
+                       <field name="fixed_fields" oils_obj:array_position="15" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="editor" reltype="has_a" key="id" map="" class="au"/>
                        <link field="creator" reltype="has_a" key="id" map="" class="au"/>
                        <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
-                       <link field="record_descriptor" reltype="has_many" key="record" map="" class="ard"/>
+                       <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
                </links>
        </class>
        <class id="ard" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor">
                        <field name="code" oils_obj:array_position="3" oils_persist:virtual="false" />
                        <field name="value" oils_obj:array_position="4" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="mccp" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment">
                <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
                        <field name="payment_ts" oils_obj:array_position="14" oils_persist:virtual="false" />
                        <field name="xact" oils_obj:array_position="15" oils_persist:virtual="false" />
                        <field name="payment_type" oils_obj:array_position="16" oils_persist:virtual="true" />
+                       <field name="payment" oils_obj:array_position="17" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
                        <field name="weight" oils_obj:array_position="7" oils_persist:virtual="false" />
                        <field name="format" oils_obj:array_position="8" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="cam" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map">
                <fields oils_persist:primary="code" oils_persist:sequence="">
                        <field name="description" oils_obj:array_position="4" oils_persist:virtual="false" />
                        <field name="value" oils_obj:array_position="5" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="cifm" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map">
                <fields oils_persist:primary="code" oils_persist:sequence="">
                        <field name="code" oils_obj:array_position="3" oils_persist:virtual="false" />
                        <field name="value" oils_obj:array_position="4" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="acn" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number">
                <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
                        <field name="id" oils_obj:array_position="3" oils_persist:virtual="false" />
                        <field name="value" oils_obj:array_position="4" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="mous" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary">
                <fields oils_persist:primary="usr" oils_persist:sequence="">
                        <field name="total_paid" oils_obj:array_position="5" oils_persist:virtual="false" />
                        <field name="usr" oils_obj:array_position="6" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="mct" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker">
                <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
                        <field name="source" oils_obj:array_position="16" oils_persist:virtual="false" />
                        <field name="tcn_source" oils_obj:array_position="17" oils_persist:virtual="false" />
                        <field name="tcn_value" oils_obj:array_position="18" oils_persist:virtual="false" />
+                       <field name="metarecord" oils_obj:array_position="19" oils_persist:virtual="true" />
+                       <field name="language" oils_obj:array_position="20" oils_persist:virtual="true" />
+                       <field name="notes" oils_obj:array_position="21" oils_persist:virtual="true" />
+                       <field name="keyword_field_entries" oils_obj:array_position="22" oils_persist:virtual="true" />
+                       <field name="subject_field_entries" oils_obj:array_position="23" oils_persist:virtual="true" />
+                       <field name="title_field_entries" oils_obj:array_position="24" oils_persist:virtual="true" />
+                       <field name="author_field_entries" oils_obj:array_position="25" oils_persist:virtual="true" />
+                       <field name="series_field_entries" oils_obj:array_position="26" oils_persist:virtual="true" />
+                       <field name="full_record_entries" oils_obj:array_position="27" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="editor" reltype="has_a" key="id" map="" class="au"/>
                        <link field="creator" reltype="has_a" key="id" map="" class="au"/>
-                       <link field="metarecords" reltype="has_many" key="source" map="metarecord" class="mmrsm"/>
+                       <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
                        <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
                        <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
-                       <link field="fixed_fields" reltype="has_many" key="record" map="" class="mrd"/>
+                       <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
+                       <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
                        <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
                        <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
                        <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
                        <field name="dow_6_close" oils_obj:array_position="15" oils_persist:virtual="false" />
                        <field name="dow_6_open" oils_obj:array_position="16" oils_persist:virtual="false" />
                        <field name="id" oils_obj:array_position="17" oils_persist:virtual="false" />
+                       <field name="org_unit" oils_obj:array_position="18" oils_persist:virtual="true" />
                </fields>
                <links>
+                       <link field="org_unit" reltype="might_have" key="id" map="" class="aou"/>
                </links>
        </class>
        <class id="aoucd" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed">
                        <field name="xact_finish" oils_obj:array_position="14" oils_persist:virtual="false" />
                        <field name="xact_start" oils_obj:array_position="15" oils_persist:virtual="false" />
                        <field name="xact_type" oils_obj:array_position="16" oils_persist:virtual="false" />
+                       <field name="xact" oils_obj:array_position="17" oils_persist:virtual="true" />
+                       <field name="grocery" oils_obj:array_position="18" oils_persist:virtual="true" />
+                       <field name="circulation" oils_obj:array_position="19" oils_persist:virtual="true" />
                </fields>
                <links>
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
+                       <link field="xact" reltype="has_a" key="might_have" map="" class="mbt"/>
+                       <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
+                       <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
                </links>
        </class>
        <class id="au" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr">
                        <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
                        <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
                        <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
+                       <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
                        <link field="circulations" reltype="has_many" key="usr" map="" class="circ"/>
-                       <link field="billable_transactions" reltype="has_many" key="usr" map="" class="circ"/>
+                       <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
                        <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
                        <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
                        <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
                        <field name="id" oils_obj:array_position="4" oils_persist:virtual="false" />
                        <field name="master_record" oils_obj:array_position="5" oils_persist:virtual="false" />
                        <field name="mods" oils_obj:array_position="6" oils_persist:virtual="false" />
+                       <field name="source_records" oils_obj:array_position="7" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
                        <field name="id" oils_obj:array_position="3" oils_persist:virtual="false" />
                        <field name="name" oils_obj:array_position="4" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="ppl" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list">
                <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
                        <field name="description" oils_obj:array_position="4" oils_persist:virtual="false" />
                        <field name="id" oils_obj:array_position="5" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="mmrsm" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map">
                <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
                        <field name="payment_ts" oils_obj:array_position="9" oils_persist:virtual="false" />
                        <field name="xact" oils_obj:array_position="10" oils_persist:virtual="false" />
                        <field name="payment_type" oils_obj:array_position="11" oils_persist:virtual="true" />
+                       <field name="payment" oils_obj:array_position="12" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
                        <field name="payment_ts" oils_obj:array_position="8" oils_persist:virtual="false" />
                        <field name="xact" oils_obj:array_position="9" oils_persist:virtual="false" />
                        <field name="payment_type" oils_obj:array_position="10" oils_persist:virtual="true" />
+                       <field name="payment" oils_obj:array_position="11" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
                </fields>
                <links>
                        <link field="record" reltype="has_a" key="id" map="" class="bre"/>
+                       <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
+                       <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
+                       <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
+                       <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
+                       <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
                </links>
        </class>
        <class id="ccs" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status">
                        <field name="id" oils_obj:array_position="4" oils_persist:virtual="false" />
                        <field name="name" oils_obj:array_position="5" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="ausp" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty">
                <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
                        <field name="xact_start" oils_obj:array_position="26" oils_persist:virtual="false" />
                        <field name="billings" oils_obj:array_position="27" oils_persist:virtual="true" />
                        <field name="payments" oils_obj:array_position="28" oils_persist:virtual="true" />
+                       <field name="billable_transaction" oils_obj:array_position="29" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
                        <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
                        <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
                        <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
+                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
+                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
+                       <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
                </links>
        </class>
        <class id="ccnbi" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item">
                </fields>
                <links>
                        <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
+                       <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
                </links>
        </class>
        <class id="acpl" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location">
                        <field name="opac_visible" oils_obj:array_position="7" oils_persist:virtual="false" />
                        <field name="owning_lib" oils_obj:array_position="8" oils_persist:virtual="false" />
                </fields>
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
                <links>
                </links>
        </class>
                        <field name="code" oils_obj:array_position="3" oils_persist:virtual="false" />
                        <field name="value" oils_obj:array_position="4" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="aoup" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity">
                <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
                        <field name="usr_summary" oils_obj:array_position="14" oils_persist:virtual="false" />
                </fields>
                <links>
+                       <link field="owner" reltype="has_a" key="survey" map="" class="aou"/>
                        <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
                        <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
                </links>
                        <field name="payment_ts" oils_obj:array_position="8" oils_persist:virtual="false" />
                        <field name="xact" oils_obj:array_position="9" oils_persist:virtual="false" />
                        <field name="payment_type" oils_obj:array_position="10" oils_persist:virtual="true" />
+                       <field name="payment" oils_obj:array_position="11" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
                        <field name="owning_lib" oils_obj:array_position="7" oils_persist:virtual="false" />
                </fields>
                <links>
+                       <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
                </links>
        </class>
        <class id="aout" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type">
                        <field name="name" oils_obj:array_position="8" oils_persist:virtual="false" />
                        <field name="opac_label" oils_obj:array_position="9" oils_persist:virtual="false" />
                        <field name="parent" oils_obj:array_position="10" oils_persist:virtual="false" />
+                       <field name="org_units" oils_obj:array_position="10" oils_persist:virtual="false" />
                </fields>
                <links>
                        <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
                        <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
+                       <link field="org_units" reltype="has_many" key="id" map="" class="aou"/>
                </links>
        </class>
        <class id="bren" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note">
                        <field name="value" oils_obj:array_position="10" oils_persist:virtual="false" />
                </fields>
                <links>
+                       <link field="creator" reltype="has_a" key="id" map="" class="au"/>
+                       <link field="editor" reltype="has_a" key="id" map="" class="au"/>
                        <link field="record" reltype="has_a" key="id" map="" class="bre"/>
                </links>
        </class>
                        <field name="usr" oils_obj:array_position="6" oils_persist:virtual="false" />
                </fields>
                <links>
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                </links>
        </class>
        <class id="mg" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery">
                        <field name="payments" oils_obj:array_position="10" oils_persist:virtual="true" />
                </fields>
                <links>
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                        <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
                        <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
                        <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
                        <field name="source" oils_obj:array_position="5" oils_persist:virtual="false" />
                        <field name="transcendant" oils_obj:array_position="6" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="mbt" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact">
                <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
                        <field name="usr" oils_obj:array_position="4" oils_persist:virtual="false" />
                        <field name="xact_finish" oils_obj:array_position="5" oils_persist:virtual="false" />
                        <field name="xact_start" oils_obj:array_position="6" oils_persist:virtual="false" />
+                       <field name="grocery" oils_obj:array_position="7" oils_persist:virtual="true" />
+                       <field name="circulation" oils_obj:array_position="8" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
                </fields>
                <links>
                        <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
                </links>
        </class>
        <class id="cubi" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item">
                        <field name="usr" oils_obj:array_position="6" oils_persist:virtual="false" />
                </fields>
                <links>
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                </links>
        </class>
        <class id="clfm" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map">
                        <field name="description" oils_obj:array_position="4" oils_persist:virtual="false" />
                        <field name="value" oils_obj:array_position="5" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="mwp" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment">
                <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
                        <field name="note" oils_obj:array_position="7" oils_persist:virtual="false" />
                        <field name="payment_ts" oils_obj:array_position="8" oils_persist:virtual="false" />
                        <field name="xact" oils_obj:array_position="9" oils_persist:virtual="false" />
-                       <field name="payment_type" oils_obj:array_position="10" oils_persist:virtual="true" />
+                       <field name="payment" oils_obj:array_position="10" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
                        <field name="usr" oils_obj:array_position="24" oils_persist:virtual="false" />
                        <field name="xact_finish" oils_obj:array_position="25" oils_persist:virtual="false" />
                        <field name="xact_start" oils_obj:array_position="26" oils_persist:virtual="false" />
+                       <field name="circulation" oils_obj:array_position="27" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
+                       <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
+                       <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
+                       <link field="recuring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
                </links>
        </class>
        <class id="msfe" oils_obj:fieldmapper="metabib::subject_field_entry" oils_persist:tablename="metabib.subject_field_entry">
                        <field name="normal" oils_obj:array_position="7" oils_persist:virtual="false" />
                        <field name="recurance_interval" oils_obj:array_position="8" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="mckp" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment">
                <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
                        <field name="note" oils_obj:array_position="9" oils_persist:virtual="false" />
                        <field name="payment_ts" oils_obj:array_position="10" oils_persist:virtual="false" />
                        <field name="xact" oils_obj:array_position="11" oils_persist:virtual="false" />
-                       <field name="payment_type" oils_obj:array_position="12" oils_persist:virtual="true" />
+                       <field name="payment" oils_obj:array_position="12" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
                        <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
+                       <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
                        <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
                </links>
        </class>
                        <field name="name" oils_obj:array_position="5" oils_persist:virtual="false" />
                        <field name="prox" oils_obj:array_position="6" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="crmf" oils_obj:fieldmapper="config::rules::max_fine" oils_persist:tablename="config.rule_max_fine">
                <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
                        <field name="id" oils_obj:array_position="4" oils_persist:virtual="false" />
                        <field name="name" oils_obj:array_position="5" oils_persist:virtual="false" />
                </fields>
-               <links>
-               </links>
+               <links/>
        </class>
        <class id="pgt" oils_obj:fieldmapper="permission::grp_tree" oils_persist:tablename="permission.grp_tree">
                <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
                        <field name="usr" oils_obj:array_position="6" oils_persist:virtual="false" />
                </fields>
                <links>
+                       <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                </links>
        </class>
        <class id="aufh" oils_obj:fieldmapper="action::unfulfilled_hold_list" oils_persist:tablename="action.unfulfilled_hold_list">
                </fields>
                <links>
                        <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
-                       <link field="depth" reltype="has_a" key="id" map="" class="aout"/>
                        <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
                </links>
        </class>
                        <field name="usr" oils_obj:array_position="7" oils_persist:virtual="false" />
                </fields>
                <links>
-                       <link field="depth" reltype="has_a" key="id" map="" class="aout"/>
                        <link field="usr" reltype="has_a" key="id" map="" class="au"/>
                        <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
                </links>
                        <field name="payment_type" oils_obj:array_position="7" oils_persist:virtual="false" />
                        <field name="xact" oils_obj:array_position="8" oils_persist:virtual="false" />
                        <field name="voided" oils_obj:array_position="9" oils_persist:virtual="false" />
+                       <field name="cash_payment" oils_obj:array_position="10" oils_persist:virtual="true" />
+                       <field name="credit_card_payment" oils_obj:array_position="11" oils_persist:virtual="true" />
+                       <field name="credit_payment" oils_obj:array_position="12" oils_persist:virtual="true" />
+                       <field name="check_payment" oils_obj:array_position="13" oils_persist:virtual="true" />
+                       <field name="work_payment" oils_obj:array_position="14" oils_persist:virtual="true" />
+                       <field name="forgive_payment" oils_obj:array_position="15" oils_persist:virtual="true" />
+                       <field name="xact" oils_obj:array_position="16" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
                        <field name="accepting_usr" oils_obj:array_position="9" oils_persist:virtual="false" />
                        <field name="cash_drawer" oils_obj:array_position="10" oils_persist:virtual="false" />
                        <field name="voided" oils_obj:array_position="11" oils_persist:virtual="false" />
+                       <field name="cash_payment" oils_obj:array_position="12" oils_persist:virtual="true" />
+                       <field name="credit_card_payment" oils_obj:array_position="13" oils_persist:virtual="true" />
+                       <field name="check_payment" oils_obj:array_position="14" oils_persist:virtual="true" />
+                       <field name="xact" oils_obj:array_position="15" oils_persist:virtual="true" />
                </fields>
                <links>
                        <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
                </fields>
                <links>
                        <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
                </links>
        </class>
        <class id="ahtc" oils_obj:fieldmapper="action::hold_transit_copy" oils_persist:tablename="action.hold_transit_copy">
                        <field name="source" oils_obj:array_position="10" oils_persist:virtual="false" />
                        <field name="source_send_time" oils_obj:array_position="11" oils_persist:virtual="false" />
                        <field name="target_copy" oils_obj:array_position="12" oils_persist:virtual="false" />
+                       <field name="transit_copy" oils_obj:array_position="13" oils_persist:virtual="true" />
                </fields>
                <links>
+                       <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
                        <link field="source" reltype="has_a" key="id" map="" class="aou"/>
                        <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
                        <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
                </fields>
                <links>
                        <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
+                       <link field="voider" reltype="has_a" key="id" map="" class="au"/>
                </links>
        </class>
        <class id="pugm" oils_obj:fieldmapper="permission::usr_grp_map" oils_persist:tablename="permission.usr_grp_map">
index f5f2591..aa6f9b6 100644 (file)
@@ -1548,7 +1548,7 @@ jsonObject* doSearch ( osrfMethodContext* ctx, osrfHash* meta, jsonObject* param
                                                        }
                                                }
 
-                                               if (!(strcmp( osrfHashGet(kid_link, "reltype"), "has_a" ))) {
+                                               if (!(strcmp( osrfHashGet(kid_link, "reltype"), "has_a" )) || !(strcmp( osrfHashGet(kid_link, "reltype"), "might_have" ))) {
                                                        osrfLogDebug(OSRF_LOG_MARK, "Storing fleshed objects in %s", osrfHashGet(kid_link, "field"));
                                                        jsonObjectSetIndex(
                                                                cur->item,