<?xml version="1.0" encoding="UTF-8"?>
<ns1:model xmlns:ns2="leaf.database.local.oracle" xmlns:ns1="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="gld_accounts">
    <ns1:fields>
        <ns1:field name="account_set_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <ns1:field name="account_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <ns1:field name="account_code" databaseType="VARCHAR2" datatype="java.lang.String" prompt="GLD_ACCOUNTS.ACCOUNT_CODE"/>
        <!-- <ns1:field name="description_id" databaseType="BIGINT" datatype="java.lang.Long" multiLanguage="true" multiLanguageDescField="account_description"/> -->
        <ns1:field name="account_description" databaseType="VARCHAR" datatype="java.lang.String" forInsert="false" forUpdate="false" prompt="GLD_ACCOUNTS.ACCOUNT_DESCRIPTION"/>
    </ns1:fields>
    <ns1:operations>
        <ns1:operation name="query">
            <ns1:query-sql><![CDATA[
    			SELECT t1.account_set_id,
				       t1.account_id,
				       t1.account_code,
				       t1.description AS account_description,
				       s.account_set_code
				  FROM gld_accounts_vl t1
				 INNER JOIN gld_account_sets s
				    ON t1.account_set_id = s.account_set_id
				 #WHERE_CLAUSE#
				       order by t1.account_code
    		]]></ns1:query-sql>
        </ns1:operation>
    </ns1:operations>
    <ns1:primary-key>
        <ns1:pk-field name="account_id"/>
    </ns1:primary-key>
    <ns1:query-fields>
        <ns1:query-field name="account_set_code" queryExpression="S.account_set_code = ${@account_set_code}"/>
        <ns1:query-field name="account_code_from" queryExpression="t1.account_code &gt;= ${@account_code_from}"/>
        <ns1:query-field name="account_code_to" queryExpression="t1.account_code &lt;= ${@account_code_to}"/>
    </ns1:query-fields>
    <ns1:data-filters>
        <ns1:data-filter enforceOperations="query" expression="t1.summary_flag = &apos;Y&apos; "/>
        <ns1:data-filter enforceOperations="query" expression="t1.enabled_flag = &apos;Y&apos;"/>
    </ns1:data-filters>
    <ns1:features>
        <ns2:sequence-pk/>
        <f:standard-who/>
        <f:multi-language-display/>
    </ns1:features>
</ns1:model>
