﻿<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>
  <entity name='llp_policybenefits'>
    <attribute name='llp_policybenefitsid' />
    <order descending='true' attribute='createdon' />
    <filter type='and'>
      <filter type='or'>
        <condition value='%VET%' attribute='llp_benefitcodeidname' operator='like' />
        <condition value='%ACC%' attribute='llp_benefitcodeidname' operator='like' />
      </filter>
    </filter>
    <link-entity name='llp_insurancepolicy' to='llp_insurancepolicyid' from='llp_insurancepolicyid' alias='ae' link-type='inner'>
      <filter type='and'>
        <condition value='${policyNr}' attribute='llp_policynumber' operator='eq' />
      </filter>
    </link-entity>
  </entity>
</fetch>
