Hi,
I want to generate a relations many to many between user and prizes with array but can’t figure it out, here the schema:
{
"title": "user",
"properties": {
"_id": {
"bsonType": "objectId"
},
"adress": {
"bsonType": "object",
"properties": {
"city": {
"bsonType": "string"
},
"zip_code": {
"bsonType": "string"
}
}
},
"firstname": {
"bsonType": "string"
},
"lastname": {
"bsonType": "string"
},
"prize_id": {
"bsonType": "objectId"
},
"prizes": {
"bsonType": "array",
"items": {
"bsonType": "object",
"properties": {
"is_favorite": {
"bsonType": "bool"
},
"prize_id": {
"bsonType": "objectId"
}
}
}
}
}
}
{
“title”: “prize”,
“properties”: {
“_id”: {
“bsonType”: “objectId”
},
“title”: {
“bsonType”: “string”
}
}
}
Found nothing on the documentation, thank you for your help.