<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: niujiaqing1265 $
    $Date: 2010/12/09 05:48:38 $
    $Revision: 1.2 $
    $Purpose: "EXP_USER_GROUP_LINES" 表对应的bm文件
-->
<ns1:model xmlns:e="leaf.service.exception" xmlns:ns1="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="ugl" baseTable="EXP_USER_GROUP_LINES">
    <ns1:fields>
        <ns1:field name="expense_user_group_id"/>
        <ns1:field name="employee_id"/>
        <!--<ns1:field name="company_short_name" expression="(select f.company_short_name   

        from fnd_companies_vl f where v.company_id = f.company_id)" forInsert="false" forUpdate="false"/>-->
    </ns1:fields>
    <ns1:primary-key>
        <ns1:pk-field name="employee_id"/>
        <ns1:pk-field name="expense_user_group_id"/>
    </ns1:primary-key>
    <ns1:relations>
        <ns1:relation name="hl" joinType="INNER" refModel="exp.EXP1060.exp_user_group_headers">
            <ns1:reference foreignField="expense_user_group_id" localField="expense_user_group_id"/>
        </ns1:relation>
        <ns1:relation name="le" joinType="INNER" refModel="exp.exp_employees">
            <ns1:reference foreignField="employee_id" localField="employee_id"/>
        </ns1:relation>
        <!--<ns1:relation name="v" joinType="inner" refModel="exp.exp_company_employees_v"   >
        	<ns1:reference foreignField="employee_id" localField="employee_id"   />
        </ns1:relation>-->
    </ns1:relations>
    <ns1:data-filters>
        <ns1:data-filter name="expense_user_group_id" enforceOperations="query" expression="hl.expense_user_group_id = ${/parameter/@expense_user_group_id}"/>
    </ns1:data-filters>
    <ns1:features>
        <f:standard-who/>
        <f:multi-language-display/>
    </ns1:features>
    <ns1:ref-fields>
        <ns1:ref-field name="employee_code" relationName="le" sourceField="employee_code"/>
        <ns1:ref-field name="name" relationName="le" sourceField="name"/>
        <ns1:ref-field name="expense_user_group_code" relationName="hl" sourceField="expense_user_group_code"/>
        <!--<ns1:ref-field name="v_employee_id" relationName="v" sourceField="employee_id"  />-->
    </ns1:ref-fields>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="EXP_USER_GROUP_LINE.DISTINCT"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</ns1:model>
