Hi,
We have two problems to resolve:
1 - How to handle condition with nested in find action 'organization.id' => $id 2 - In the example below when query return no result, the CopyColumn process and Custom process generate an error (Not find index)
$positions_source = $this->src("mongodb")
->query([
"collection" => "positions",
"find" => [
'vrn' => $this->params['vrn'],
'organization.id' => $id,
'acquired_at' => [
'$exists' => true,
'$gte' => new \MongoDB\BSON\UTCDateTime($start * 1000),
'$lte' => new \MongoDB\BSON\UTCDateTime($end * 1000)
]
]
])->pipe(new CopyColumn(array(
"date"=>"acquired_at"
)))->pipe(new Custom(function($row){
$row["date"] = $row["acquired_at"]->toDateTime()->format('H:m:s');
return $row;
}));