<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HN_COND_CHANGE_APPROVAL">
    <bm:fields>
        <bm:field name="approval_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="APPROVAL_ID" prompt="HN_COND_CHANGE_APPROVAL.APPROVAL_ID"/>
        <bm:field name="hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HD_ID" prompt="HN_COND_CHANGE_APPROVAL.HD_ID"/>
        <bm:field name="meeting_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MEETING_ID" prompt="HN_COND_CHANGE_APPROVAL.MEETING_ID"/>
        <bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS" prompt="HN_COND_CHANGE_APPROVAL.STATUS"/>
        <bm:field name="approval_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="APPROVAL_COUNT" prompt="HN_COND_CHANGE_APPROVAL.APPROVAL_COUNT"/>
        <bm:field name="approval_seq" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVAL_SEQ" prompt="HN_COND_CHANGE_APPROVAL.APPROVAL_SEQ"/>
        <bm:field name="approver_comment_summary" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVER_COMMENT_SUMMARY" prompt="HN_COND_CHANGE_APPROVAL.APPROVER_COMMENT_SUMMARY"/>
        <bm:field name="meeting_name" forInsert="false" forUpdate="false"/>
        <bm:field name="meeting_location" forInsert="false" forUpdate="false"/>
        <bm:field name="meeting_date" datatype="java.util.Date" forInsert="false" forUpdate="false"/>
        <bm:field name="meeting_time" databaseType="VARCHAR2" datatype="java.lang.String"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="approval_id"/>
    </bm:primary-key>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                select * from (SELECT
                    cca.approval_id,
                    cca.hd_id,
                    cca.meeting_id,
                    cca.status,
                    cca.approval_count,
                    cca.approval_seq,
                    cca.approver_comment_summary,
                    cca.meeting_time,
                    ppm.meeting_name,
                    ppm.meeting_location,
                    ppm.meeting_date,
                    ppm.meeting_status
                FROM
                    hn_cond_change_approval cca,
                    prj_project_meeting ppm
                WHERE
                    cca.meeting_id = ppm.meeting_id(+)) t1
                    #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.approval_id = ${@approval_id}"/>
    </bm:data-filters>
</bm:model>
