We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is possible to make nested objects greater than 1, for example, by the parameter "objectContentCount" so that according to this configuration
[{"database":"db", "collection":"cd_card_tree", "count":1, "content":{ "id_cleint":{"type":"long","maxLong":999999999999}, "id_card":{"type":"object", "objectContentCount":2, "objectContent":{ "card_no":{"type":"long","maxLong":9999999999}, "card_date":{"type":"date"}, "transaction":{"type":"object", "objectContentCount":2, "objectContent":{ "tran_sum":{"type":"decimal"}, "tran_date":{"type":"date"}} } } } } }]
to make it work, this is the result [ { "_id": ObjectId("5a934e000102030405000001"), "id_cleint": NumberLong(863926077139), "id_card":[{ "card_date": "2021-10-01", "card_no": NumberLong(1539691641), "transaction":[ { "tran_date": "2022-03-11", "tran_sum": 100.0 }, { "tran_date": "2022-03-11", "tran_sum": 200.0 }] }, { "card_date": "2021-11-21", "card_no": NumberLong(4539691641), "transaction":[ { "tran_date": "2022-03-11", "tran_sum": 100.0 }, { "tran_date": "2022-03-11", "tran_sum": 200.0 }] }] } ]
The text was updated successfully, but these errors were encountered:
you need to use an array generator for this:
array
[ { "database": "db", "collection": "cd_card_tree", "count": 1, "content": { "id_client": { "type": "long", "maxLong": 999999999999 }, "id_card": { "type": "array", "minLength": 2, "maxLength": 2, "arrayContent": { "type": "object", "objectContent": { "card_no": { "type": "long", "maxLong": 9999999999 }, "card_date": { "type": "date" }, "transaction": { "type": "array", "minLength": 2, "maxLength": 2, "arrayContent": { "type": "object", "objectContent": { "tran_sum": { "type": "decimal" }, "tran_date": { "type": "date" } } } } } } } } } ]
you can try it here: mongoplayground.net/p/NxMxni8rnKj
Sorry, something went wrong.
No branches or pull requests
It is possible to make nested objects greater than 1, for example, by the parameter "objectContentCount"
so that according to this configuration
[{"database":"db",
"collection":"cd_card_tree",
"count":1,
"content":{
"id_cleint":{"type":"long","maxLong":999999999999},
"id_card":{"type":"object", "objectContentCount":2, "objectContent":{
"card_no":{"type":"long","maxLong":9999999999},
"card_date":{"type":"date"},
"transaction":{"type":"object", "objectContentCount":2, "objectContent":{
"tran_sum":{"type":"decimal"},
"tran_date":{"type":"date"}}
}
}
}
}
}]
to make it work, this is the result
[
{
"_id": ObjectId("5a934e000102030405000001"),
"id_cleint": NumberLong(863926077139),
"id_card":[{
"card_date": "2021-10-01",
"card_no": NumberLong(1539691641),
"transaction":[
{
"tran_date": "2022-03-11",
"tran_sum": 100.0
},
{
"tran_date": "2022-03-11",
"tran_sum": 200.0
}]
},
{
"card_date": "2021-11-21",
"card_no": NumberLong(4539691641),
"transaction":[
{
"tran_date": "2022-03-11",
"tran_sum": 100.0
},
{
"tran_date": "2022-03-11",
"tran_sum": 200.0
}]
}]
}
]
The text was updated successfully, but these errors were encountered: