Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89a7309707 | ||
|
|
55ec9c5e5b | ||
|
|
cbb4dcb025 | ||
|
|
a0bad13505 | ||
|
|
d13521ae5d | ||
|
|
51f1526214 | ||
|
|
d049d96952 | ||
|
|
885bf0eae9 | ||
|
|
2a8ffd53d8 | ||
|
|
d54ed61581 | ||
|
|
9e76da91a9 |
6
pom.xml
6
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<version>3.1.2</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.4.1</version>
|
||||
<version>2.4.2</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
@@ -26,7 +26,7 @@
|
||||
<properties>
|
||||
<project.type>multi</project.type>
|
||||
<dist.id>spring-data-mongodb</dist.id>
|
||||
<springdata.commons>2.4.1</springdata.commons>
|
||||
<springdata.commons>2.4.2</springdata.commons>
|
||||
<mongo>4.1.1</mongo>
|
||||
<mongo.reactivestreams>${mongo}</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>3.1.1</version>
|
||||
<version>3.1.2</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<version>3.1.2</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb-parent</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<version>3.1.2</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import kotlin.reflect.KProperty1
|
||||
* @since 2.2
|
||||
*/
|
||||
class KPropertyPath<T, U>(
|
||||
internal val parent: KProperty<U>,
|
||||
internal val parent: KProperty<U?>,
|
||||
internal val child: KProperty1<U, T>
|
||||
) : KProperty<T> by child
|
||||
|
||||
@@ -52,7 +52,8 @@ internal fun asString(property: KProperty<*>): String {
|
||||
* Book::author / Author::name isEqualTo "Herman Melville"
|
||||
* ```
|
||||
* @author Tjeu Kayim
|
||||
* @author Yoann de Martino
|
||||
* @since 2.2
|
||||
*/
|
||||
operator fun <T, U> KProperty<T>.div(other: KProperty1<T, U>) =
|
||||
operator fun <T, U> KProperty<T?>.div(other: KProperty1<T, U>) =
|
||||
KPropertyPath(this, other)
|
||||
|
||||
@@ -93,6 +93,15 @@ class KPropertyPathTests {
|
||||
assertThat(property).isEqualTo("entity.book.author.name")
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-2661
|
||||
fun `Convert nullable KProperty to field name`() {
|
||||
class Cat(val name: String)
|
||||
class Owner(val cat: Cat?)
|
||||
|
||||
val property = asString(Owner::cat / Cat::name)
|
||||
assertThat(property).isEqualTo("cat.name")
|
||||
}
|
||||
|
||||
class Book(val title: String, val author: Author)
|
||||
class Author(val name: String)
|
||||
}
|
||||
|
||||
@@ -41,7 +41,62 @@ The starting point for learning about MongoDB is https://www.mongodb.org/[www.mo
|
||||
|
||||
The Spring Data MongoDB 3.x binaries require JDK level 8.0 and above and https://spring.io/docs[Spring Framework] {springVersion} and above.
|
||||
|
||||
In terms of document stores, you need at least version 2.6 of https://www.mongodb.org/[MongoDB].
|
||||
In terms of document stores, you need at least version 3.6 of https://www.mongodb.org/[MongoDB], though we recommend a more recent version.
|
||||
|
||||
[[compatibility.matrix]]
|
||||
=== Compatibility Matrix
|
||||
|
||||
The following compatibility matrix summarizes Spring Data versions to MongoDB driver/database versions.
|
||||
Database versions show the highest supported server version that pass the Spring Data test suite.
|
||||
You can use newer server versions unless your application uses functionality that is affected by <<compatibility.changes,changes in the MongoDB server>>.
|
||||
|
||||
[cols="h,m,m,m", options="header"]
|
||||
|===
|
||||
|
||||
|Spring Data Release Train
|
||||
|Spring Data MongoDB
|
||||
|Driver Version
|
||||
|Server Version
|
||||
|
||||
|2021.0
|
||||
|3.2.x
|
||||
|4.1.x
|
||||
|4.4.x
|
||||
|
||||
|2020.0
|
||||
|3.1.x
|
||||
|4.1.x
|
||||
|4.4.x
|
||||
|
||||
|Neumann
|
||||
|3.0.x
|
||||
|4.0.x
|
||||
|4.4.x
|
||||
|
||||
|Moore
|
||||
|2.2.x
|
||||
|3.11.x/Reactive Streams 1.12.x
|
||||
|4.2.x
|
||||
|
||||
|Lovelace
|
||||
|2.1.x
|
||||
|3.8.x/Reactive Streams 1.9.x
|
||||
|4.0.x
|
||||
|
||||
|===
|
||||
|
||||
[[compatibility.changes]]
|
||||
[[compatibility.changes-4.4]]
|
||||
==== Relevant Changes in MongoDB 4.4
|
||||
|
||||
* Fields list must not contain text search score property when no `$text` criteria present. See also https://docs.mongodb.com/manual/reference/operator/query/text/[`$text` operator]
|
||||
* Sort must not be an empty document when running map reduce.
|
||||
|
||||
[[compatibility.changes-4.2]]
|
||||
==== Relevant Changes in MongoDB 4.2
|
||||
|
||||
* Removal of `geoNear` command. See also https://docs.mongodb.com/manual/release-notes/4.2-compatibility/#remove-support-for-the-geonear-command[Removal of `geoNear`]
|
||||
* Removal of `eval` command. See also https://docs.mongodb.com/manual/release-notes/4.2-compatibility/#remove-support-for-the-eval-command[Removal of `eval`]
|
||||
|
||||
[[get-started:help]]
|
||||
== Additional Help Resources
|
||||
|
||||
@@ -1,6 +1,38 @@
|
||||
Spring Data MongoDB Changelog
|
||||
=============================
|
||||
|
||||
Changes in version 3.1.2 (2020-12-09)
|
||||
-------------------------------------
|
||||
* DATAMONGO-2663 - Document Spring Data to MongoDB compatibility.
|
||||
* DATAMONGO-2661 - Handle nullable types for KPropertyPath.
|
||||
* DATAMONGO-2653 - Release 3.1.2 (2020.0.2).
|
||||
|
||||
|
||||
Changes in version 3.2.0-M1 (2020-12-09)
|
||||
----------------------------------------
|
||||
* DATAMONGO-2663 - Document Spring Data to MongoDB compatibility.
|
||||
* DATAMONGO-2661 - Handle nullable types for KPropertyPath.
|
||||
* DATAMONGO-2659 - Allow disk use on Query.
|
||||
* DATAMONGO-2652 - Implement CrudRepository.delete(Iterable<ID> ids).
|
||||
* DATAMONGO-2649 - Release 3.2 M1 (2021.0.0).
|
||||
* DATAMONGO-2644 - Invalid reference '_id'! Error In spring data mongodb.
|
||||
* DATAMONGO-2635 - Enums Don't Properly Serialize In Aggregation Pipeline Facet.
|
||||
|
||||
|
||||
Changes in version 3.0.6.RELEASE (2020-12-09)
|
||||
---------------------------------------------
|
||||
* DATAMONGO-2663 - Document Spring Data to MongoDB compatibility.
|
||||
* DATAMONGO-2661 - Handle nullable types for KPropertyPath.
|
||||
* DATAMONGO-2647 - Release 3.0.6 (Neumann SR6).
|
||||
* DATAMONGO-2644 - Invalid reference '_id'! Error In spring data mongodb.
|
||||
|
||||
|
||||
Changes in version 2.2.12.RELEASE (2020-12-09)
|
||||
----------------------------------------------
|
||||
* DATAMONGO-2663 - Document Spring Data to MongoDB compatibility.
|
||||
* DATAMONGO-2646 - Release 2.2.12 (Moore SR12).
|
||||
|
||||
|
||||
Changes in version 3.1.1 (2020-11-11)
|
||||
-------------------------------------
|
||||
* DATAMONGO-2648 - Release 3.1.1 (2020.0.1).
|
||||
@@ -3221,6 +3253,10 @@ Repository
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Spring Data MongoDB 3.1.1 (2020.0.1)
|
||||
Spring Data MongoDB 3.1.2 (2020.0.2)
|
||||
Copyright (c) [2010-2019] Pivotal Software, Inc.
|
||||
|
||||
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
||||
@@ -21,3 +21,4 @@ conditions of the subcomponent's license, as noted in the LICENSE file.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user