Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/src/main/asciidoc/hibernate-orm.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,13 @@ EntityManager entityManager;
----
<1> Here again, we use the same `@io.quarkus.hibernate.orm.PersistenceUnit` annotation.

[NOTE]
====
The injected `EntityManager` or `Session` instance is a proxy that requires an active transaction for interaction.
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`.
====

You can inject the `EntityManagerFactory` of a named persistence unit using the exact same mechanism:

[source,java]
Expand Down
Loading