I have a query in which I need to chain api.Contact.getsingle
twice, given that the entity I'm querying is linked to two different contacts for which I need to fetch the data.
The problem is that, given that both chained calls have the same name, it seems that the last one overrides the first.
Basically I need to do this:
$result = civicrm_api3('MyEntity', 'get', array(
'sequential' => 1,
'api.Contact.getsingle' => array('id' => "\$value.contact_id"),
'api.Contact.getsingle' => array('id' => "\$value.manager_id"),
));
but with the ability to "alias" each chained call so that they don't get overridden
Is it possible to do it? If not, what a different approach would look like?
Thanks!