<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:e="leaf.service.exception" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="fcdv" baseTable="FND_COMPANY_DIMENSION_VALUES">
    <bm:fields>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="COMPANY_ID"/>
        <bm:field name="dimension_value_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="DIMENSION_VALUE_ID"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="FND_COMPANY_DIMENSION_VALUES.ENABLED_FLAG"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="company_id"/>
        <bm:pk-field name="dimension_value_id"/>
    </bm:primary-key>
    <bm:relations>
        <bm:relation name="fcvl" joinType="INNER" refModel="fnd.fnd_companies_vl">
            <bm:reference foreignField="company_id" localField="company_id"/>
        </bm:relation>
    </bm:relations>
    <bm:ref-fields>
        <bm:ref-field name="company_code" prompt="FND_COMPANIES.COMPANY_CODE" relationName="fcvl" sourceField="company_code"/>
        <bm:ref-field name="company_short_name" prompt="FND_COMPANIES_VL.COMPANY_SHORT_NAME" relationName="fcvl" sourceField="company_short_name"/>
    </bm:ref-fields>
    <bm:query-fields>
        <bm:query-field field="dimension_value_id" queryExpression="dimension_value_id=${@dimension_value_id}"/>
    </bm:query-fields>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="FND_COOMPANY_DIMENSION.DISTINCT_COMPANY"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
