<?xml version="1.0"?>

<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>

    <BUSINESSCLASS name="Occupation" package="performa.orm">

        <IMPORT value="performa.orm.types.*" />

        <MULTIPLEREFERENCE  name="ChildOccupations" type="Occupation"   backreferenceName="ParentOccupation"  />

        <TABLE name="tl_occupation" tablePrefix="object"    polymorphic="FALSE">
            <ATTRIB name="Code"     type="String"           dbcol="code"    length="4"      mandatory="true"            isUnique="true"/>
            <ATTRIB name="Name"     type="String"           dbcol="name"    length="250"    mandatory="true"/>
            <ATTRIB name="Level"    type="OccupationLevel"  dbcol="level"   attribHelper="EnumeratedAttributeHelper"    mandatory="true"/>
            
            <SINGLEREFERENCE name="ParentOccupation"    type="Occupation"   dbcol="parent_occupation_id"    backreferenceName="ChildOccupations"/>
        </TABLE> 

        <SEARCH type="All"  paramFilter="object_id is not null"   orderBy="object_id"/>
        
    </BUSINESSCLASS>
</ROOT>