<?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
                    faa.file_name,
                    faa.file_path
                FROM
                    fnd_atm_attachment faa,
                    fnd_atm_attachment_multi faam
                WHERE
                    faa.attachment_id    = faam.attachment_id AND
                    faa.source_type_code = 'fnd_atm_attachment_multi' AND
                    faa.source_pk_value  = faam.record_id AND
                    faam.table_name      = 'ZJ_SYS_MAILING_LIST'
                    and faam.table_pk_value = ${@mailing_list_id}
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="file_name"/>
        <bm:field name="file_path"/>
    </bm:fields>
</bm:model>
