<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    *
                FROM
                    (SELECT
                        cc.contract_id,
                        cc.contract_name,
                        cc.contract_number,
                        hbm.bp_name
                        ||
                        (SELECT
                            '、'
                            ||ccb.bp_name
                        FROM
                            con_contract_bp ccb
                        WHERE
                            ccb.contract_id=cc.contract_id AND
                            ccb.bp_type    ='TENANT_SEC'
                        ) bp_name
                    FROM
                        con_contract cc,
                        hls_bp_master hbm
                    WHERE
                        cc.data_class  ='NORMAL' AND
                        cc.bp_id_tenant=hbm.bp_id
                    ) t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
