From fecb060f4f1a47853c42ae463661a84fad4eca08 Mon Sep 17 00:00:00 2001 From: Mark Pollack Date: Thu, 7 Apr 2011 01:42:54 -0400 Subject: [PATCH] DATADOC-59 - Document @Query annotation for repositories --- src/docbkx/reference/mongo-repositories.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/docbkx/reference/mongo-repositories.xml b/src/docbkx/reference/mongo-repositories.xml index cb80e7e50..0aa55abe0 100644 --- a/src/docbkx/reference/mongo-repositories.xml +++ b/src/docbkx/reference/mongo-repositories.xml @@ -268,11 +268,11 @@ public class PersonRepositoryTests {
Mongo JSON based query methods and field restriction - The annotation - org.springframework.data.document.mongodb.repository.Query can be - applied to finder methods on your repository which allows you to specify - a Mongo JSON string to define the actual query to be executed instead of - infering the query from the method name. For example + By adding the annotation + org.springframework.data.document.mongodb.repository.Query + repository finder methods you can specify a Mongo JSON query string to + use instead of having the query derived from the method name. For + example public interface PersonRepository extends MongoRepository<Person, String> @@ -281,10 +281,10 @@ public class PersonRepositoryTests { } - The placeholder ?0 lets you substitue the value from the method - arguments into the JSON query definition. + The placeholder ?0 lets you substitute the value from the method + arguments into the JSON query string. - You can also use the filter property to define the set of + You can also use the filter property to restrict the set of properties that will be mapped into the Java object. For example,