diff --git a/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseDocument.java b/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseDocument.java index 26a6834dd..0e2164536 100644 --- a/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseDocument.java +++ b/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseDocument.java @@ -18,14 +18,14 @@ import com.couchbase.client.java.json.JsonObject; -import java.util.HashMap; +import java.util.TreeMap; import java.util.Map; /** * A {@link CouchbaseDocument} is an abstract representation of a document stored inside Couchbase Server. *
*- * It acts like a {@link HashMap}, but only allows those types to be written that are supported by the underlying + * It acts like a {@link TreeMap}, but only allows those types to be written that are supported by the underlying * storage format, which is currently JSON. Note that JSON conversion is not happening here, but performed at a * different stage based on the payload stored in the {@link CouchbaseDocument}. *
@@ -85,7 +85,7 @@ public CouchbaseDocument(final String id) { public CouchbaseDocument(final String id, final int expiration) { this.id = id; this.expiration = expiration; - content = new HashMap<>(); + content = new TreeMap<>(); } /** @@ -119,8 +119,8 @@ public final Object get(final String key) { * * @return */ - public final HashMap