Browse Source

DATAMONGO-2040 - Polishing.

Deprecate Index.Duplicates. Remove unused imports. Mention deprecation in What's new.

Original pull request: #599.
pull/599/merge
Mark Paluch 7 years ago
parent
commit
03246f04b8
  1. 4
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/Index.java
  2. 1
      spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/query/IndexUnitTests.java
  3. 1
      src/main/asciidoc/new-features.adoc

4
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/Index.java

@ -36,6 +36,10 @@ import org.springframework.util.StringUtils; @@ -36,6 +36,10 @@ import org.springframework.util.StringUtils;
@SuppressWarnings("deprecation")
public class Index implements IndexDefinition {
/**
* @deprecated since 2.1. No longer supported by MongoDB as of server version 3.0.
*/
@Deprecated
public enum Duplicates {
RETAIN
}

1
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/query/IndexUnitTests.java

@ -24,7 +24,6 @@ import org.springframework.data.domain.Sort.Direction; @@ -24,7 +24,6 @@ import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexType;
import org.springframework.data.mongodb.core.index.GeospatialIndex;
import org.springframework.data.mongodb.core.index.Index;
import org.springframework.data.mongodb.core.index.Index.Duplicates;
/**
* Unit tests for {@link Index}.

1
src/main/asciidoc/new-features.adoc

@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
* <<mongo.transactions, MongoDB 4.0 Transaction>> support and a MongoDB-specific transaction manager implementation.
* <<mongodb.repositories.queries.sort,Default sort specifications for repository query methods>> using `@Query(sort=…)`.
* <<mongo-template.find-and-replace,findAndReplace>> support through imperative and reactive Template APIs.
* Deprecation of `dropDups` in `@Indexed` and `@CompoundIndex` as MongoDB server 3.0 and newer do not support `dropDups` anymore.
[[new-features.2-0-0]]
== What's New in Spring Data MongoDB 2.0

Loading…
Cancel
Save