$p = new Place();
$p->include_join_fields();
$p->where_in_related('buyer', 'id', $buyer_ids);
$p->get_iterated();
foreach ($p as $place) {
$map[$place->join_buyer_id]->place[] = $place;
}
I cannot seem to access $place->join_buyer_id] in the final foreach loop. (The join_fields are not in the query select and not in the object.) What do I have to do in order to access the join field?
EDIT: Also the instantiation does not seem to work for $b->include_related('user', NULL, TRUE, TRUE);. I can access $row->user_username, but not $row->user->username. Not that it matters, but it would be nice to know why…