Hello,
I'm having trouble retrieving related objects for collections in my implementation. I'm trying to get objects related to collections with idno "conferences", specifically filtering for objects with idno "event_location"
Here's my current code:
$qr_events = ca_collections::find(
['idno' => 'conferences'],
[
'returnAs' => 'searchResult',
'sort' => 'ca_collections.date',
'sortDirection' => 'desc',
'load' => [
'ca_objects' => [
'returnWithStructure' => true
]
]
]
);
// ... other code ...
// Get related objects with idno = 'event_location'
$related_objects = $qr_events->get('ca_objects', [
'returnAsArray' => true,
'where' => [
['idno', '=', 'event_location']
]
]);
The issue:
- The collection search works fine - I get my conference collections
- The $related_objects array is always empty, even though I know relationships exist
- I've verified that objects with idno "event_location" are properly related to these collections in the database
Any help would be greatly appreciated!
Thank you,