
"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>" +
"<entity name='allocation'>" +
"<link-entity name='account' from='accountid' to='lender' link-type='inner' alias='aa'>"+
"<link-entity name='legalname' from='alenderid' to='accountid' link-type='inner' alias='ab'>"+
"<filter type='and'>"+
"<condition link-entityname='ab' attribute='program' operator='eq' value='"+programId+"' />"+
"</filter>"+
"</link-entity>" +
"</link-entity>" +
"</entity>" +
"</fetch>";
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" savedqueryid="gh5e0c29-b72c-f011-8c4e-002248abcdef" returntotalrecordcount="true" page="1" count="50" no-lock="false">
<entity name="allocation">
<link-entity name="account" from="accountid" to="acl_lender" alias="aa">
<link-entity name="legalname" from="lenderid" to="accountid" alias="ab">
<filter type="and">
<condition attribute="program" operator="not-null" />
</filter>
</link-entity>
</link-entity>
<attribute name="allocationid" />
<filter type="and">
<condition attribute="program" operator="eq" value="{8IJK1790-B7D7-EB11-ABCD-000D3A15EFGH}" />
</filter>
</entity>
</fetch>