<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: duzhihong  
    $Date: 2014-10-24 上午11:20:05  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[select *
  from (select t.project_id, t.project_number, t.project_name
          from prj_project t
         where exists (select 1
                  from con_contract t1
                 where t1.project_id = t.project_id
                   and t1.contract_status = 'INCEPT')) t2 #WHERE_CLAUSE#]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
        <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="200" forDisplay="true" forQuery="true" physicalName="PROJECT_NUMBER" prompt="合同编号"/>
        <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="200" forDisplay="true" forQuery="true" physicalName="PROJECT_NAME" prompt="合同名称"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="project_number" queryOperator="like"/>
        <bm:query-field field="project_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
