Suppose I have some objects in MongoDB:
{
"_id":xxx,
"name":"mike",
"children": [
{"name":"A", "age":3},
{"name":"B", "age": 5}
]
}
If I want to get this "mike" with his children sorted by "age desc", what should I do?
I've looked at Mongoid(in rails), and morphia(in Java), not found the answer.