diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java index 8682f77ec8..3e03dc8f91 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/MongoTemplate.java @@ -188,6 +188,7 @@ * @author Michael Krog * @author Jakub Zurawa * @author Florian Lüdiger + * @author Seungho Kang */ public class MongoTemplate implements MongoOperations, ApplicationContextAware, IndexOperationsProvider, SearchIndexOperationsProvider, ReadPreferenceAware { @@ -1159,7 +1160,7 @@ GeoResults doGeoNear(NearQuery near, Class domainType, String colle Assert.notNull(collectionName, "CollectionName must not be null"); Assert.notNull(resultType, "ResultType must not be null Use Object.class instead"); - Assert.isTrue(query.getLimit() <= 1, "Query must not define a limit other than 1 ore none"); + Assert.isTrue(query.getLimit() <= 1, "Query must not define a limit other than 1 or none"); Assert.isTrue(query.getSkip() <= 0, "Query must not define skip"); MongoPersistentEntity entity = mappingContext.getPersistentEntity(entityType); @@ -2129,7 +2130,7 @@ protected UpdateResult replace(Query query, Class entityType, T replac Assert.notNull(entityType, "EntityType must not be null"); Assert.notNull(collectionName, "CollectionName must not be null"); - Assert.isTrue(query.getLimit() <= 1, "Query must not define a limit other than 1 ore none"); + Assert.isTrue(query.getLimit() <= 1, "Query must not define a limit other than 1 or none"); Assert.isTrue(query.getSkip() <= 0, "Query must not define skip"); UpdateContext updateContext = queryOperations.replaceSingleContext(query, diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoTemplate.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoTemplate.java index 232f35cd1b..1dbefdccc0 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoTemplate.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/ReactiveMongoTemplate.java @@ -184,6 +184,7 @@ * @author Mathieu Ouellet * @author Yadhukrishna S Pai * @author Florian Lüdiger + * @author Seungho Kang * @since 2.0 */ public class ReactiveMongoTemplate implements ReactiveMongoOperations, ApplicationContextAware { @@ -1193,7 +1194,7 @@ public Mono findAndReplace(Query query, S replacement, FindAndRepla Assert.notNull(collectionName, "CollectionName must not be null"); Assert.notNull(resultType, "ResultType must not be null Use Object.class instead"); - Assert.isTrue(query.getLimit() <= 1, "Query must not define a limit other than 1 ore none"); + Assert.isTrue(query.getLimit() <= 1, "Query must not define a limit other than 1 or none"); Assert.isTrue(query.getSkip() <= 0, "Query must not define skip"); MongoPersistentEntity entity = mappingContext.getPersistentEntity(entityType);