Skip to content

Commit 8e11afb

Browse files
authored
[JAVA] Improve map/flatmap of Publisher[Void] (#499)
* what's new: flatmap and observables
1 parent b34c2d6 commit 8e11afb

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

source/upgrade.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,18 @@ Version 5.0 Breaking Changes
104104

105105
VectorSearchOptions opts = vectorSearchOptions().filter(eq("x", 8));
106106

107+
.. _java-breaking-changes-v5.0-observables:
108+
109+
- This driver version removes the
110+
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
111+
class. This means the ``org.reactivestreams.Publisher[Void]`` type no longer
112+
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The also
113+
API exposes ``org.mongodb.scala.Observable[Unit]`` instead of
114+
``org.mongodb.scala.Observable[Void]``.
115+
116+
.. After the 5.0 Scala API docs are released, this line will be uncommented.
117+
For more information, see the `Observable trait documentation <https://mongodb.github.io/mongo-java-driver/5.0/apidocs/mongo-scala-driver/org/mongodb/scala/Observable.html>`__.
118+
107119
.. _java-breaking-changes-v4.8:
108120

109121
Version 4.8 Breaking Changes

source/whats-new.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ The 5.0 driver release introduces the following features:
5959
``isNumber()`` and ``asNumber()`` methods match the Java responses for
6060
equivalent ``Decimal128`` values.
6161

62+
- The ``org.mongodb.scala.Observable.completeWithUnit()`` method is deprecated.
63+
This relates to a :ref:`breaking change about Observables in this version
64+
<java-breaking-changes-v5.0-observables>`.
65+
6266
.. _version-4.11:
6367

6468
What's New in 4.11

0 commit comments

Comments
 (0)