File tree 1 file changed +9
-7
lines changed
documentation/src/main/asciidoc/reference
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -670,12 +670,14 @@ the session when you're done.
670
670
671
671
[source, JAVA, indent=0]
672
672
----
673
- Session session = sessionFactory.openSession();
674
- session.find(Book.class, id)
675
- .invoke(
676
- book -> ... //do something with the book
677
- )
678
- .eventually(session::close);
673
+ Uni<Session> sessionUni = sessionFactory.openSession();
674
+ sessionUni.chain(
675
+ session -> session.find(Book.class, id)
676
+ .invoke(
677
+ book -> ... //do something with the book
678
+ )
679
+ .eventually(session::close)
680
+ );
679
681
----
680
682
681
683
=== Using the reactive session
@@ -1281,4 +1283,4 @@ or `withTransaction()`.
1281
1283
1282
1284
Hibernate Reactive is now integrated in {Quarkus}[Quarkus] and {Panache}[Panache].
1283
1285
Configuration works slightly differently in Quarkus, so be sure to check the Quarkus
1284
- documentation for details.
1286
+ documentation for details.
You can’t perform that action at this time.
0 commit comments