Home > Back-end >  About the spring data mongo aggregate of a problem
About the spring data mongo aggregate of a problem

Time:10-09


The results look like
[{
_id: 18,
Detail: [
{
Gender: "male",
Total: 2,
AvgHeight: 177.5
},
{
Gender: "female",
Total: 1,
AvgHeight: 158
}
]
},
{
_id: 17,
Detail: [
{
Gender: "male",
Total: 1,
AvgHeight: 178
},
{
Gender: "female",
Total: 2,
AvgHeight: 156
}
]
}]
Then use the spring aggregation, push method can add more fields, a single bosses how to deal with, please?
  • Related