﻿<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>
  <entity name='llp_animals'>
    <attribute name='llp_name'/>
    <attribute name='llp_animalsid'/>
    <attribute name='llp_animaltype'/>
    <attribute name='llp_breederstation'/>
    <attribute name='llp_dob'/>
    <attribute name='llp_chipnr'/>
    <attribute name='llp_breedbooknr'/>
    <attribute name='llp_breedid'/>
    <attribute name='llp_note'/>
    <attribute name='llp_handoverdate'/>
    <attribute name='llp_policyexpiration'/>
    <attribute name='llp_policyid'/>
    <order attribute='llp_name' descending='false'/>
    <filter type='and'>
      <condition attribute='llp_throwsrcid' operator='eq' value='${throwId}'/>
      <condition attribute='statuscode' operator='eq' value='1'/>
    </filter>
    <link-entity name='llp_breed' from='llp_breedid' to='llp_breedid' link-type='inner' alias='breed'>
      <attribute name='llp_name'/>
    </link-entity>
  </entity>
</fetch>