Compare commits

...

10 Commits

Author SHA1 Message Date
Mark Paluch
6cb8055601 DATAMONGO-2083 - Release version 1.10.16 (Ingalls SR16). 2018-10-15 12:56:30 +02:00
Mark Paluch
34829fca84 DATAMONGO-2083 - Prepare 1.10.16 (Ingalls SR16). 2018-10-15 12:55:35 +02:00
Mark Paluch
94b2495145 DATAMONGO-2083 - Updated changelog. 2018-10-15 12:55:29 +02:00
Mark Paluch
f2301eaf5b DATAMONGO-2084 - Updated changelog. 2018-10-15 12:46:26 +02:00
Mark Paluch
e3e201edb9 DATAMONGO-2094 - Updated changelog. 2018-10-15 11:37:25 +02:00
Christoph Strobl
c738148b40 DATAMONGO-2096 - Fix target field name for GraphLookup aggregation operation.
We now make sure to use the target field name instead of the alias when processing GraphLookupOperation.

Original pull request: #613.
2018-10-05 15:17:42 +02:00
Mark Paluch
ec5268a862 DATAMONGO-2061 - Updated changelog. 2018-09-21 08:13:12 -04:00
Mark Paluch
9bc073501f DATAMONGO-2034 - Updated changelog. 2018-09-10 14:15:51 +02:00
Mark Paluch
3d00ef1076 DATAMONGO-2035 - After release cleanups. 2018-09-10 10:01:44 +02:00
Mark Paluch
a07ca615be DATAMONGO-2035 - Prepare next development iteration. 2018-09-10 10:01:43 +02:00
10 changed files with 101 additions and 13 deletions

View File

@@ -5,7 +5,7 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.10.15.RELEASE</version>
<version>1.10.16.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>1.9.15.RELEASE</version>
<version>1.9.16.RELEASE</version>
</parent>
<modules>
@@ -28,7 +28,7 @@
<properties>
<project.type>multi</project.type>
<dist.id>spring-data-mongodb</dist.id>
<springdata.commons>1.13.15.RELEASE</springdata.commons>
<springdata.commons>1.13.16.RELEASE</springdata.commons>
<mongo>2.14.3</mongo>
<mongo.osgi>2.13.0</mongo.osgi>
<jmh.version>1.19</jmh.version>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.10.15.RELEASE</version>
<version>1.10.16.RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.10.15.RELEASE</version>
<version>1.10.16.RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -49,7 +49,7 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>1.10.15.RELEASE</version>
<version>1.10.16.RELEASE</version>
</dependency>
<dependency>

View File

@@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.10.15.RELEASE</version>
<version>1.10.16.RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.10.15.RELEASE</version>
<version>1.10.16.RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.10.15.RELEASE</version>
<version>1.10.16.RELEASE</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@@ -104,8 +104,8 @@ public class GraphLookupOperation implements InheritsFieldsAggregationOperation
graphLookup.put("startWith", mappedStartWith.size() == 1 ? mappedStartWith.iterator().next() : mappedStartWith);
graphLookup.put("connectFromField", connectFrom.getName());
graphLookup.put("connectToField", connectTo.getName());
graphLookup.put("connectFromField", connectFrom.getTarget());
graphLookup.put("connectToField", connectTo.getTarget());
graphLookup.put("as", as.getName());
if (maxDepth != null) {
@@ -113,7 +113,7 @@ public class GraphLookupOperation implements InheritsFieldsAggregationOperation
}
if (depthField != null) {
graphLookup.put("depthField", depthField.getName());
graphLookup.put("depthField", depthField.getTarget());
}
if (restrictSearchWithMatch != null) {

View File

@@ -133,4 +133,40 @@ public class GraphLookupOperationUnitTests {
assertThat(dbObject, is(JSON.parse("{ $graphLookup : { from: \"employees\", startWith: { $literal: \"hello\"}, "
+ "connectFromField: \"reportsTo\", connectToField: \"name\", as: \"reportingHierarchy\" } }")));
}
@Test // DATAMONGO-2096
public void connectFromShouldUseTargetFieldInsteadOfAlias() {
AggregationOperation graphLookupOperation = Aggregation.graphLookup("user").startWith("contacts.userId")
.connectFrom("contacts.userId").connectTo("_id").depthField("numConnections").as("connections");
DBObject document = graphLookupOperation.toDBObject(Aggregation.DEFAULT_CONTEXT);
assertThat(document, is(JSON.parse(
"{ \"$graphLookup\" : { \"from\" : \"user\", \"startWith\" : \"$contacts.userId\", \"connectFromField\" : \"contacts.userId\", \"connectToField\" : \"_id\", \"as\" : \"connections\", \"depthField\" : \"numConnections\" } }")));
}
@Test // DATAMONGO-2096
public void connectToShouldUseTargetFieldInsteadOfAlias() {
AggregationOperation graphLookupOperation = Aggregation.graphLookup("user").startWith("contacts.userId")
.connectFrom("userId").connectTo("connectto.field").depthField("numConnections").as("connections");
DBObject document = graphLookupOperation.toDBObject(Aggregation.DEFAULT_CONTEXT);
assertThat(document, is(JSON.parse(
"{ \"$graphLookup\" : { \"from\" : \"user\", \"startWith\" : \"$contacts.userId\", \"connectFromField\" : \"userId\", \"connectToField\" : \"connectto.field\", \"as\" : \"connections\", \"depthField\" : \"numConnections\" } }")));
}
@Test // DATAMONGO-2096
public void depthFieldShouldUseTargetFieldInsteadOfAlias() {
AggregationOperation graphLookupOperation = Aggregation.graphLookup("user").startWith("contacts.userId")
.connectFrom("contacts.userId").connectTo("_id").depthField("foo.bar").as("connections");
DBObject document = graphLookupOperation.toDBObject(Aggregation.DEFAULT_CONTEXT);
assertThat(document, is(JSON.parse(
"{ \"$graphLookup\" : { \"from\" : \"user\", \"startWith\" : \"$contacts.userId\", \"connectFromField\" : \"contacts.userId\", \"connectToField\" : \"_id\", \"as\" : \"connections\", \"depthField\" : \"foo.bar\" } }")));
}
}

View File

@@ -1,6 +1,58 @@
Spring Data MongoDB Changelog
=============================
Changes in version 1.10.16.RELEASE (2018-10-15)
-----------------------------------------------
* DATAMONGO-2096 - Aggregation.graphLookup.**.connectFrom(String) does not handle nested field.
* DATAMONGO-2083 - Release 1.10.16 (Ingalls SR16).
Changes in version 2.0.11.RELEASE (2018-10-15)
----------------------------------------------
* DATAMONGO-2101 - NoSuchMethodException: org.springframework.data.mongodb.core.geo.GeoJsonPoint.<init>().
* DATAMONGO-2096 - Aggregation.graphLookup.**.connectFrom(String) does not handle nested field.
* DATAMONGO-2087 - Typo in MongoRepository.
* DATAMONGO-2086 - Kotlin Fluent API extensions do not allow projections with find queries.
* DATAMONGO-2084 - Release 2.0.11 (Kay SR11).
Changes in version 2.1.1.RELEASE (2018-10-15)
---------------------------------------------
* DATAMONGO-2096 - Aggregation.graphLookup.**.connectFrom(String) does not handle nested field.
* DATAMONGO-2094 - Release 2.1.1 (Lovelace SR1).
Changes in version 2.1.0.RELEASE (2018-09-21)
---------------------------------------------
* DATAMONGO-2091 - Upgrade to MongoDB Java Driver 3.8.2 and Reactive Streams Driver 1.9.2.
* DATAMONGO-2090 - Include documentation about Object Mapping Fundamentals.
* DATAMONGO-2087 - Typo in MongoRepository.
* DATAMONGO-2086 - Kotlin Fluent API extensions do not allow projections with find queries.
* DATAMONGO-2080 - DTO projections with reactive @Tailable query methods fail with IllegalArgumentException: Property must not be null.
* DATAMONGO-2078 - Update reference documentation on tailable cursors with the sync MongoDB Java driver.
* DATAMONGO-2076 - Fix property substitution in getting started section of reference docs.
* DATAMONGO-2075 - Open up MongoTransaction manager to allow transaction commit retry..
* DATAMONGO-2069 - Required dependency 'mysema-commons-lang'.
* DATAMONGO-2065 - Make sure that MongoTemplate.doSave(…) calls local populateIdIfNecessary(…) to allow customization.
* DATAMONGO-2064 - Upgrade to MongoDB Java Driver 3.8.1.
* DATAMONGO-2061 - Release 2.1 GA (Lovelace).
Changes in version 2.0.10.RELEASE (2018-09-10)
----------------------------------------------
* DATAMONGO-2076 - Fix property substitution in getting started section of reference docs.
* DATAMONGO-2055 - Allow position modifier to be negative using push at position on Update.
* DATAMONGO-2051 - Add support for SCRAM-SHA-256 authentication mechanism to MongoCredentialPropertyEditor.
* DATAMONGO-2050 - Add support for index selection via key attribute for $geoNear aggregation.
* DATAMONGO-2049 - Add support for MongoDB 4.0 string aggregation operators.
* DATAMONGO-2048 - Add support for MongoDB 4.0 type conversion aggregation operators.
* DATAMONGO-2047 - Update $dateToString and $dateFromString aggregation operators to match MongoDB 4.0 changes.
* DATAMONGO-2046 - Investigate performance regressions between 2.0 GA and 2.1 RC2.
* DATAMONGO-2043 - MappingMongoConverter.write(…) does not consider Document a native type and adds _class attribute.
* DATAMONGO-2034 - Release 2.0.10 (Kay SR10).
* DATAMONGO-2027 - outputCollection and outputType of MapReduceOptions not work.
Changes in version 1.10.15.RELEASE (2018-09-10)
-----------------------------------------------
* DATAMONGO-2076 - Fix property substitution in getting started section of reference docs.

View File

@@ -1,4 +1,4 @@
Spring Data MongoDB 1.10.15
Spring Data MongoDB 1.10.16
Copyright (c) [2010-2015] Pivotal Software, Inc.
This product is licensed to you under the Apache License, Version 2.0 (the "License").