Compare commits
12 Commits
2.2.9.RELE
...
2.2.10.REL
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df73c567ce | ||
|
|
47ce8258b0 | ||
|
|
e523d9a1cb | ||
|
|
d65632c097 | ||
|
|
29bf4f72f3 | ||
|
|
ee79b9939b | ||
|
|
156ec5b441 | ||
|
|
931028b43e | ||
|
|
687c4d35ed | ||
|
|
71ac036dc3 | ||
|
|
da3ab42f10 | ||
|
|
537fc1caad |
6
pom.xml
6
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>2.2.9.RELEASE</version>
|
||||
<version>2.2.10.RELEASE</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Spring Data MongoDB</name>
|
||||
@@ -15,7 +15,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data.build</groupId>
|
||||
<artifactId>spring-data-parent</artifactId>
|
||||
<version>2.2.9.RELEASE</version>
|
||||
<version>2.2.10.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
@@ -26,7 +26,7 @@
|
||||
<properties>
|
||||
<project.type>multi</project.type>
|
||||
<dist.id>spring-data-mongodb</dist.id>
|
||||
<springdata.commons>2.2.9.RELEASE</springdata.commons>
|
||||
<springdata.commons>2.2.10.RELEASE</springdata.commons>
|
||||
<mongo>3.11.2</mongo>
|
||||
<mongo.reactivestreams>1.12.0</mongo.reactivestreams>
|
||||
<jmh.version>1.19</jmh.version>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>2.2.9.RELEASE</version>
|
||||
<version>2.2.10.RELEASE</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>2.2.9.RELEASE</version>
|
||||
<version>2.2.10.RELEASE</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>2.2.9.RELEASE</version>
|
||||
<version>2.2.10.RELEASE</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ReplaceRootOperation implements FieldsExposingAggregationOperation
|
||||
*
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
static class ReplaceRootDocumentOperation extends ReplaceRootOperation {
|
||||
public static class ReplaceRootDocumentOperation extends ReplaceRootOperation {
|
||||
|
||||
private final static ReplacementDocument EMPTY = new ReplacementDocument();
|
||||
private final ReplacementDocument current;
|
||||
|
||||
@@ -47,6 +47,7 @@ import com.mongodb.client.model.geojson.Polygon;
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public abstract class MongoSimpleTypes {
|
||||
|
||||
@@ -107,6 +108,10 @@ public abstract class MongoSimpleTypes {
|
||||
@Override
|
||||
public boolean isSimpleType(Class<?> type) {
|
||||
|
||||
if (type.isEnum()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (type.getName().startsWith("java.time")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @author Michał Kurcius
|
||||
* @since 2.1
|
||||
*/
|
||||
public class TypedJsonSchemaObject extends UntypedJsonSchemaObject {
|
||||
@@ -1203,7 +1204,7 @@ public class TypedJsonSchemaObject extends UntypedJsonSchemaObject {
|
||||
Document doc = new Document(super.toDocument());
|
||||
|
||||
if (!CollectionUtils.isEmpty(items)) {
|
||||
doc.append("items", items.size() == 1 ? items.iterator().next()
|
||||
doc.append("items", items.size() == 1 ? items.iterator().next().toDocument()
|
||||
: items.stream().map(JsonSchemaObject::toDocument).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ package org.springframework.data.mongodb.core.mapping;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
@@ -158,6 +159,18 @@ public class MongoMappingContextUnitTests {
|
||||
.withMessageContaining("score").withMessageContaining("Float").withMessageContaining("Double");
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-2599
|
||||
public void shouldNotCreateEntityForEnum() {
|
||||
|
||||
MongoMappingContext context = new MongoMappingContext();
|
||||
|
||||
BasicMongoPersistentEntity<?> entity = context.getRequiredPersistentEntity(ClassWithChronoUnit.class);
|
||||
|
||||
assertThat(entity.getPersistentProperty("unit").isEntity()).isFalse();
|
||||
assertThat(context.hasPersistentEntityFor(ChronoUnit.class)).isFalse();
|
||||
assertThat(context.getPersistentEntity(ChronoUnit.class)).isNull();
|
||||
}
|
||||
|
||||
public class SampleClass {
|
||||
|
||||
Map<String, SampleClass> children;
|
||||
@@ -224,4 +237,9 @@ public class MongoMappingContextUnitTests {
|
||||
|
||||
@TextScore Locale score;
|
||||
}
|
||||
|
||||
class ClassWithChronoUnit {
|
||||
|
||||
ChronoUnit unit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.springframework.data.domain.Range.*;
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @author Michał Kurcius
|
||||
*/
|
||||
public class JsonSchemaObjectUnitTests {
|
||||
|
||||
@@ -267,6 +268,13 @@ public class JsonSchemaObjectUnitTests {
|
||||
.append("items", Arrays.asList(new Document("type", "string"), new Document("type", "boolean"))));
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-2613
|
||||
public void arrayObjectShouldRenderItemsCorrectlyAsObjectIfContainsOnlyOneElement() {
|
||||
|
||||
assertThat(array().items(Collections.singletonList(string())).toDocument()).isEqualTo(new Document("type", "array")
|
||||
.append("items", new Document("type", "string")));
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-1835
|
||||
public void arrayObjectShouldRenderMaxItemsCorrectly() {
|
||||
|
||||
|
||||
@@ -1,6 +1,57 @@
|
||||
Spring Data MongoDB Changelog
|
||||
=============================
|
||||
|
||||
Changes in version 2.2.10.RELEASE (2020-09-16)
|
||||
----------------------------------------------
|
||||
* DATAMONGO-2618 - ReplaceRootDocumentOperation not visible.
|
||||
* DATAMONGO-2613 - ArrayJsonSchemaObject incorrectly mapped to Document.
|
||||
* DATAMONGO-2599 - Ambiguous field mapping detected for enum java.time.temporal.ChronoUnit.
|
||||
* DATAMONGO-2593 - Release 2.2.10 (Moore SR10).
|
||||
|
||||
|
||||
Changes in version 2.1.20.RELEASE (2020-09-16)
|
||||
----------------------------------------------
|
||||
* DATAMONGO-2618 - ReplaceRootDocumentOperation not visible.
|
||||
* DATAMONGO-2613 - ArrayJsonSchemaObject incorrectly mapped to Document.
|
||||
* DATAMONGO-2592 - Release 2.1.20 (Lovelace SR20).
|
||||
|
||||
|
||||
Changes in version 3.0.3.RELEASE (2020-08-12)
|
||||
---------------------------------------------
|
||||
* DATAMONGO-2601 - Consider Unit a void type in Coroutine repositories.
|
||||
* DATAMONGO-2599 - Ambiguous field mapping detected for enum java.time.temporal.ChronoUnit.
|
||||
* DATAMONGO-2598 - Wording changes.
|
||||
* DATAMONGO-2594 - Release 3.0.3 (Neumann SR3).
|
||||
|
||||
|
||||
Changes in version 3.1.0-M2 (2020-08-12)
|
||||
----------------------------------------
|
||||
* DATAMONGO-2603 - Adopt to Reactor 3.4 changes.
|
||||
* DATAMONGO-2602 - Upgrade MongoDB drivers to 4.1.0.
|
||||
* DATAMONGO-2601 - Consider Unit a void type in Coroutine repositories.
|
||||
* DATAMONGO-2599 - Ambiguous field mapping detected for enum java.time.temporal.ChronoUnit.
|
||||
* DATAMONGO-2598 - Wording changes.
|
||||
* DATAMONGO-2591 - Upgrade MongoDB drivers to 4.1.0-rc0.
|
||||
* DATAMONGO-2586 - Add support for reactive auditing.
|
||||
* DATAMONGO-2579 - Release 3.1 M2 (2020.0.0).
|
||||
* DATAMONGO-2571 - regex expression included "/" character can't be parsed in the stage of aggregation annotation.
|
||||
* DATAMONGO-2536 - Add option to discard results on $out and $merge.
|
||||
* DATAMONGO-2490 - @DBRef fetched without ClientSession when using Spring Transactions.
|
||||
* DATAMONGO-1894 - Use reactive subscriber context for SpEL evaluation in query execution.
|
||||
* DATAMONGO-1836 - Add support for hint option to aggregation.
|
||||
|
||||
|
||||
Changes in version 3.0.2.RELEASE (2020-07-22)
|
||||
---------------------------------------------
|
||||
* DATAMONGO-2589 - Upgrade to MongoDB Driver 4.0.5.
|
||||
* DATAMONGO-2572 - Remove usage of Oppressive Language.
|
||||
* DATAMONGO-2571 - regex expression included "/" character can't be parsed in the stage of aggregation annotation.
|
||||
* DATAMONGO-2570 - Avoiding unintentional unboxing.
|
||||
* DATAMONGO-2568 - Release 3.0.2 (Neumann SR2).
|
||||
* DATAMONGO-2536 - Add option to discard results on $out and $merge.
|
||||
* DATAMONGO-2490 - @DBRef fetched without ClientSession when using Spring Transactions.
|
||||
|
||||
|
||||
Changes in version 2.2.9.RELEASE (2020-07-22)
|
||||
---------------------------------------------
|
||||
* DATAMONGO-2572 - Remove usage of Oppressive Language.
|
||||
@@ -3087,6 +3138,11 @@ Repository
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Spring Data MongoDB 2.2.9 (Moore SR9)
|
||||
Spring Data MongoDB 2.2.10 (Moore SR10)
|
||||
Copyright (c) [2010-2019] Pivotal Software, Inc.
|
||||
|
||||
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
||||
@@ -15,3 +15,4 @@ conditions of the subcomponent's license, as noted in the LICENSE file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user