Below query works fine for mongo version 4.2, but when I run the same query on the older version it is an error -"The dollar ($) prefixed field $concat in GUID.$concat is not valid for storage".
db.getCollection('xxxx').update(
{ "SHARE": false },
[{
"$set": {
"GUID": {
"$concat": [
{ $toString: "$ID" },
{ $toString: "$DATE" }
]
}
}
}],
{
upsert: false,
multi: true
}
)
Is there any way to modify the above query in older mongo version.
$concat, etc.) and then an update.