grails(2.3.7) mongodb gormプラグインmongodb:3.0.1を使用しています。 私はdbに次のコレクションを持っています
{
"_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 を使用して、日付順 (コメント内) でコメント パラメータ内のクエリを実行したいと考えています。
前もって感謝します