How does the MongoDB know how to noise all questions to New Zealand in Spring-Data Custom @?
I would like
db.collection.aggregate ([{$ sort: {url: 1, ($ $ $ $ $ $): $ {$ group: {_id: {url: "$ url", path: "$ path"}, last checked: {$ last: "$ checkedOn"}}}])
Runs and gives a collection like this:
{"results": [{_id}: {"url": "http://www.google." (2015-03 -17T11: 43: 01.222Z "}}, {" _id ": {" url ":" http: /www.google.co.uk "," path ":" / about2 "}," last check ": ISADAT ("2015-03-17T11: 43: 04.213Z"}}], "OK": 1}
I want to do this as part of spring-data custom query :
@RepositoryRestResource (collectionResourceRel = "HealthCake", path = "HealthCake") Public Interface LinkRegository MongoRepository and lt; link, string & gt; {@Query ("{'status': {$ gt: 299}, 'path':" 0} ") list & lt; check links & Gt; FindByPathAndInvalid (@Param ("path") string path); @security (** total query goes here **) list & lt; check links & gt; findByLatest ();}
I can not insert the entire query directly into @Query because the result is not directly mapped to the archive link object.
Only reference I can find on an old spring-sandbox project but it has not been updated since 2013:
No comments:
Post a Comment