You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/hibernate-orm.adoc
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -486,6 +486,13 @@ EntityManager entityManager;
486
486
----
487
487
<1> Here again, we use the same `@io.quarkus.hibernate.orm.PersistenceUnit` annotation.
488
488
489
+
[NOTE]
490
+
====
491
+
The injected `EntityManager` or `Session` instance is a proxy that requires an active transaction for interaction.
492
+
493
+
By default it is also possible to use it for read-only operations without a transaction when in a request scope, but this can be disabled by setting `quarkus.hibernate-orm.request-scoped.enabled` to `false`.
494
+
====
495
+
489
496
You can inject the `EntityManagerFactory` of a named persistence unit using the exact same mechanism:
0 commit comments