I have a custom entity called new_origonatingaccounts which is linked to Accounts. 1:N relationship account.accountid to new_origonatingaccounts.new_licenceid
if i had 4 records in new_transactionsets linked to accounts.name = '110022'
new_noitems new_submissionvalue new_accountname new_accointid
7 38.50 account 5 005 ( 3 records for new_accountid 005)
<fetch version="1.0" mapping="logical" distinct="false" >
<entity name="new_transactionsets" >
<attribute name="new_noitems" />
<attribute name="new_submissionvalue" />
<attribute name="new_submittedon" />
<filter type="and" >
<condition attribute="new_submittedon" operator="last-month" />
</filter>
<link-entity name="new_originatingaccounts" from="new_originatingaccountsid" to="new_oaccountid" visable="false" link-type="outer" >
<attribute name="new_accountname" />
<attribute name="new_accountid" />
<order attribute="new_accountid" ascending="true" />
<link-entity name="account" from="accountid" to="new_licenceid" visable="false" link-type="outer" >
<attribute name="name" />
<filter type="and" >
<condition attribute="name" operator="eq" value="110022" />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>