<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="op" extend="exp.exp_org_position" extendMode="reference">
    <bm:fields>
        <bm:field name="position_id"/>
        <bm:field name="position_code" displayWidth="100" forDisplay="true" forQuery="true" prompt="EXP_ORG_POSITION.POSITION_CODE"/>
        <bm:field name="description_id" multiLanguage="true" multiLanguageDescField="position_name"/>
        <bm:field name="position_name" displayWidth="120" forDisplay="true" forQuery="true" forUpdate="false" prompt="EXP_ORG_POSITION.POSITION_NAME"/>
        <bm:field name="employee_job_description" displayWidth="117" forDisplay="true" prompt="EXP_EMPLOYEE_JOBS.EMPLOYEE_JOB_DESCRIPTION"/>
    </bm:fields>
    <bm:primary-key>
        <bm:pk-field name="position_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="position_code" queryOperator="like"/>
        <bm:query-field field="position_name" queryExpression="exists (select 1 from fnd_descriptions fd where op.description_id=fd.description_id and fd.description_text like ${@position_name} and fd.language = ${/session/@lang})"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="op.company_id=${@company_id} and op.enabled_flag=&apos;Y&apos;"/>
    </bm:data-filters>
    <bm:relations>
        <bm:relation name="job" joinType="left outer" refModel="exp.EXP1040.exp_employee_jobs">
            <bm:reference foreignField="employee_job_id" localField="employee_job_id"/>
        </bm:relation>
    </bm:relations>
    <bm:features>
        <ns2:sequence-pk/>
        <f:standard-who/>
        <f:multi-language-display/>
    </bm:features>
    <bm:ref-fields>
        <bm:ref-field name="level_series_id" relationName="job" sourceField="level_series_id"/>
        <bm:ref-field name="employee_job_id" relationName="job" sourceField="employee_job_id"/>
        <bm:ref-field name="employee_job_code" displayWidth="100" forDisplay="true" prompt="EXP_EMPLOYEE_JOBS.EMPLOYEE_JOB_CODE" relationName="job" sourceField="employee_job_code"/>
        <bm:ref-field name="employee_job_description_id" multiLanguage="true" multiLanguageDescField="employee_job_description" relationName="job" sourceField="description_id"/>
    </bm:ref-fields>
</bm:model>
