Closed rickhg12hs closed 2 years ago
Hi @rickhg12hs,
you can't use MongoDB extended JSON v1 notation in mgodatagen, but you can use [MongoDB extended JSON v2]() ( which is valid JSON) like this :
[
{
"collection": "collection",
"count": 10,
"content": {
"key": {
"type": "enum",
"values": [
{
"$oid": "624ac834820a8747b065a561"
},
{
"$oid": "624ac834820a8747b065a562"
},
{
"$oid": "624ac834820a8747b065a563"
},
{
"$oid": "624ac834820a8747b065a564"
},
{
"$oid": "624ac834820a8747b065a565"
}
]
}
}
}
]
Hi @feliixx,
Super! Now I know! :-)
Shouldn't it be possible to have an
enum
ofObjectId
s in themgodatagen
configuration?I ran into this on mongoplayground.net:
... but this produced an error: