<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang 
    $Date: 2015-11-27 上午09:19:03  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="EXP_EXPENSE_ITEM_TYPES" defaultOrderBy="t1.expense_item_types_id">
    <bm:fields>
        <bm:field name="expense_item_types_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EXPENSE_ITEM_TYPES_ID" prompt="EXP_EXPENSE_ITEM_TYPES.EXPENSE_ITEM_TYPES_ID"/>
        <bm:field name="expense_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EXPENSE_ITEM_ID" prompt="EXP_EXPENSE_ITEM_TYPES.EXPENSE_ITEM_ID"/>
        <bm:field name="expense_type_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EXPENSE_TYPE_ID" prompt="EXP_EXPENSE_ITEM_TYPES.EXPENSE_TYPE_ID"/>
        <bm:field name="expense_item_code" expression="(select eei.expense_item_code from exp_expense_items eei where eei.expense_item_id =t1.expense_item_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="expense_item_desc" expression="(select eei.expense_item_desc from exp_expense_items eei where eei.expense_item_id =t1.expense_item_id)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="expense_item_types_id"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter name="expense_type_id" enforceOperations="query" expression="t1.expense_type_id=${@expense_type_id}"/>
    </bm:data-filters>
</bm:model>
