diff --git a/pom.xml b/pom.xml
index 1d9b760700..7a947b52e1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-mongodb-parent
- 1.9.0.BUILD-SNAPSHOT
+ 1.9.0.DATAMONGO-1403-SNAPSHOT
pom
Spring Data MongoDB
diff --git a/spring-data-mongodb-cross-store/pom.xml b/spring-data-mongodb-cross-store/pom.xml
index fd36debedd..ff45b9fe7d 100644
--- a/spring-data-mongodb-cross-store/pom.xml
+++ b/spring-data-mongodb-cross-store/pom.xml
@@ -6,7 +6,7 @@
org.springframework.data
spring-data-mongodb-parent
- 1.9.0.BUILD-SNAPSHOT
+ 1.9.0.DATAMONGO-1403-SNAPSHOT
../pom.xml
@@ -48,7 +48,7 @@
org.springframework.data
spring-data-mongodb
- 1.9.0.BUILD-SNAPSHOT
+ 1.9.0.DATAMONGO-1403-SNAPSHOT
diff --git a/spring-data-mongodb-distribution/pom.xml b/spring-data-mongodb-distribution/pom.xml
index 28c91bc332..55b299b9c1 100644
--- a/spring-data-mongodb-distribution/pom.xml
+++ b/spring-data-mongodb-distribution/pom.xml
@@ -13,7 +13,7 @@
org.springframework.data
spring-data-mongodb-parent
- 1.9.0.BUILD-SNAPSHOT
+ 1.9.0.DATAMONGO-1403-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb-log4j/pom.xml b/spring-data-mongodb-log4j/pom.xml
index dfe146ff96..345878297f 100644
--- a/spring-data-mongodb-log4j/pom.xml
+++ b/spring-data-mongodb-log4j/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-mongodb-parent
- 1.9.0.BUILD-SNAPSHOT
+ 1.9.0.DATAMONGO-1403-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml
index 0fcdb2f39f..42cb63b534 100644
--- a/spring-data-mongodb/pom.xml
+++ b/spring-data-mongodb/pom.xml
@@ -11,7 +11,7 @@
org.springframework.data
spring-data-mongodb-parent
- 1.9.0.BUILD-SNAPSHOT
+ 1.9.0.DATAMONGO-1403-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Meta.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Meta.java
index d864e6814b..90e16fae04 100644
--- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Meta.java
+++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Meta.java
@@ -21,6 +21,7 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+import org.springframework.core.annotation.AliasFor;
import org.springframework.data.annotation.QueryAnnotation;
/**
@@ -36,28 +37,41 @@
/**
* Set the maximum time limit in milliseconds for processing operations.
- *
+ *
+ * @deprecated because of spelling issues. Please use {@link #maxExecutionTimeMs()} instead.
* @return
*/
+ @AliasFor("maxExecutionTimeMs")
+ @Deprecated
long maxExcecutionTime() default -1;
+ /**
+ * Set the maximum time limit in milliseconds for processing operations.
+ * This is an alias for {@link #maxExcecutionTime()}
+ *
+ * @return
+ * @since 1.10
+ */
+ @AliasFor("maxExcecutionTime")
+ long maxExecutionTimeMs() default -1;
+
/**
* Only scan the specified number of documents.
- *
+ *
* @return
*/
long maxScanDocuments() default -1;
/**
* Add a comment to the query.
- *
+ *
* @return
*/
String comment() default "";
/**
* Using snapshot prevents the cursor from returning a document more than once.
- *
+ *
* @return
*/
boolean snapshot() default false;
diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/repository/query/MongoQueryMethodUnitTests.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/repository/query/MongoQueryMethodUnitTests.java
index e591d66870..efea28a23b 100644
--- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/repository/query/MongoQueryMethodUnitTests.java
+++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/repository/query/MongoQueryMethodUnitTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2015 the original author or authors.
+ * Copyright 2011-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,9 +43,10 @@
/**
* Unit test for {@link MongoQueryMethod}.
- *
+ *
* @author Oliver Gierke
* @author Christoph Strobl
+ * @author Mark Paluch
*/
public class MongoQueryMethodUnitTests {
@@ -151,6 +152,19 @@ public void createsMongoQueryMethodWithMaxExecutionTimeCorrectly() throws Except
assertThat(method.getQueryMetaAttributes().getMaxTimeMsec(), is(100L));
}
+
+ /**
+ * @see DATAMONGO-1403
+ */
+ @Test
+ public void createsMongoQueryMethodWithSpellFixedMaxExecutionTimeCorrectly() throws Exception {
+
+ MongoQueryMethod method = queryMethod(PersonRepository.class, "metaWithSpellFixedMaxExecutionTime");
+
+ assertThat(method.hasQueryMetaAttributes(), is(true));
+ assertThat(method.getQueryMetaAttributes().getMaxTimeMsec(), is(100L));
+ }
+
/**
* @see DATAMONGO-957
*/
@@ -224,6 +238,9 @@ interface PersonRepository extends Repository {
@Meta(maxExcecutionTime = 100)
List metaWithMaxExecutionTime();
+ @Meta(maxExecutionTimeMs = 100)
+ List metaWithSpellFixedMaxExecutionTime();
+
@Meta(maxScanDocuments = 10)
List metaWithMaxScan();