I have written following code for aggregation of two tables in php application
$lookupTwo = array(
'$lookup'=> array(
"from" => "studentTbl",
"localField" => "studentDetailId",
"foreignField" => "studentId",
"as" => "recieverDetails"
)
);
Now I am facing an issue, the studentDetailId
field is stored as a string and studentId
is stored as an integer.
The above query will return empty result.
- Is there any possibility for performing aggregation in such case?