我正在使用grails(2.3.7) mongodb gorm插件mongodb:3.0.1。 我在数据库中有以下集合
{
"_id" : ObjectId("567eac392c56fd49950e2441"),
"comments" : [
{
"commentText" : "test comments!",
"userId" : "patient@gmail.com",
"likes" : 10,
"date" : "2015-12-25T10:34:53.048Z"
},
{
"commentText" : "master piece",
"userId" : "patient@gmail.com",
"likes" : 12,
"date" : "2015-12-25T10:34:53.052Z"
},
{
"commentText" : "test comments!",
"userId" : "patient@gmail.com",
"likes" : 10,
"date" : "2015-12-25T10:34:53.048Z"
},
{
"commentText" : "master piece",
"userId" : "patient@gmail.com",
"likes" : 12,
"date" : "2015-12-25T10:34:53.052Z"
}
],
"doctorUserId" : "doctor2@gmail.com",
"recommendation" : 0,
"version" : NumberLong(2)
}
现在我想使用 mongoDB gorm 按日期(内部注释)查询内部注释参数顺序
提前致谢