Provides support to increase developer productivity in Java when using MongoDB. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
This will separate the queries(strings) and repository(java) separate. It will also make queries easier to write. The queries will look elegant and natural as they are used in mongodb
Ankur Pathak opened DATAMONGO-2013 and commented
We should store our mongo db queries in json something like below:
{ "filters" : { "User.username" : { "username" : "?1" } },
"sorts": { "User.username" :{ "username" : -1 }
},
"projections" : { "User.username" : { "firstName": true, "lastName" : true, "_id": false
}
},
"aggregations": {
}
}
And then use them in repositories like below:
interface IUserRepository extends MongoRepository<User, Long> {
@NamedQuery
(sort = "User.username", filter: "User.username", projetion: "User.username") Page\This will separate the queries(strings) and repository(java) separate. It will also make queries easier to write. The queries will look elegant and natural as they are used in mongodb
No further details from DATAMONGO-2013