DATAMONGO-2040 - Polishing.

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

Original pull request: #599.
This commit is contained in:
Mark Paluch
2018-08-14 16:03:40 +02:00
parent 50070dfc64
commit 03246f04b8
3 changed files with 5 additions and 1 deletions

View File

@@ -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
}

View File

@@ -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}.

View File

@@ -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