When doing .aggregate on users collection, with $lookup, an oauth field is empty
I've already tried to use pipeline and local/foreign fields
User.aggregate([
{
$match: objectQuery,
},
{
$lookup: {
from: 'OAuthAccessToken',
as: 'oauth',
localField: '_id',
foreignField: 'user'
}
])
There is no any error message, oauth field is empty.
_id in User collection is type string
user in OAuthAccessToken collection is type string