<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    t.attribute_1,
                    t.attribute_2,
                    t.attribute_3,
                    t.attribute_4,
                    t.attribute_5,
                    t.attribute_6,
                    t.attribute_7,
                    t.attribute_8,
                    t.import_flag,
                    t.logs,
                    t.repayment_plan_id,
                    (SELECT
                        h.loan_contract_number
                    FROM
                        tre_loan_con_repayment_plan_lv h
                    WHERE
                        h.repayment_plan_id = t.repayment_plan_id
                    )loan_contract_number,
                    (SELECT
                        h.loan_contract_name
                    FROM
                        tre_loan_con_repayment_plan_lv h
                    WHERE
                        h.repayment_plan_id = t.repayment_plan_id
                    )loan_contract_name,
                    (SELECT
                        h.withdrawal_num
                    FROM
                        tre_loan_con_repayment_plan_lv h
                    WHERE
                        h.repayment_plan_id = t.repayment_plan_id
                    )withdrawal_num,
                    (SELECT
                        h.ref_v01
                    FROM
                        tre_loan_con_repayment_plan_lv h
                    WHERE
                        h.repayment_plan_id = t.repayment_plan_id
                    ) ref_v01,
                    (SELECT
                        h.times
                    FROM
                        tre_loan_con_repayment_plan_lv h
                    WHERE
                        h.repayment_plan_id = t.repayment_plan_id
                    ) times
                FROM
                    tre_repayment_plan_imp t
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="attribute_1" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTRIBUTE_1"/>
        <bm:field name="attribute_2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTRIBUTE_2"/>
        <bm:field name="attribute_3" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTRIBUTE_3"/>
        <bm:field name="attribute_4" databaseType="DATE" datatype="java.util.Date" physicalName="ATTRIBUTE_4"/>
        <bm:field name="attribute_5" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ATTRIBUTE_5"/>
        <bm:field name="attribute_6" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ATTRIBUTE_6"/>
        <bm:field name="attribute_7" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ATTRIBUTE_7"/>
        <bm:field name="attribute_8" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTRIBUTE_8"/>
        <bm:field name="logs" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOGS"/>
        <bm:field name="repayment_plan_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REPAYMENT_PLAN_ID"/>
        <bm:field name="loan_contract_number"/>
        <bm:field name="loan_contract_name"/>
        <bm:field name="withdrawal_num"/>
        <bm:field name="ref_v01"/>
        <bm:field name="times"/>
        <bm:field name="import_flag"/>
    </bm:fields>
</bm:model>
